6 Uninstalling OCNADD
This chapter provides information on how to uninstall Oracle Communications Network Analytics Data Director (OCNADD).
When you uninstall a helm chart from the OCNADD deployment, it removes only the Kubernetes objects created during the installation.
Note:
kubectl commands might vary based on the platform deployment. Replace kubectl with Kubernetes environment-specific command line tool to configure kubernetes resources through kube-api server. The instructions provided in this document are as per the Oracle Communications Cloud Native Core, Cloud Native Environment (CNE) version of kube-api server.
Caution:
- While deleting any OCNADD resources make sure to provide the corresponding namespace used in the deployment.
- Based on requirement, make sure to retain the OCNADD backup before the uninstallation procedure. For more information, see Performing OCNADD Backup Procedures.
- Ensure any configured datafeeds are deleted using the OCNADD GUI prior to performing the OCNADD uninstallation steps. For deletion of the datafeeds, refer to Oracle Communications Network Analytics Data Director User Guide.
To uninstall OCNADD, run the following command:
helm3 uninstall <release_name> --namespace <namespace>Helm keeps a record of its releases, so you can still reactivate the release after uninstalling it. To completely remove a release from the cluster, add the --purge parameter to helm delete command:
helm delete --purge <release_name> --namespace <namespace>where, release_name is a name provided to identify the helm deployment.
release-namespace is the name provided to identify the namespace of OCNADD deployment.
Cleaning Up Database
To clean up database, perform the following steps:- Log in to the MySQL client on SQL Node with the OCNADD user and
password:
mysql -h <IP_adress of SQL Node> -u <ocnadduser> -p (Give password in prompt) - To clean up the configuration, alarm, and health database, run the
following
command:
mysql> drop database <dbname>; - To remove MySQL users while uninstalling OCNADD, run the following
commands:
SELECT user FROM mysql.user; DROP USER 'ocnaddappuser@'%';
Cleaning up Kafka Configuration
- To list the secrets in the namespace, run the following
command:
kubectl get secrets -n <namespace> - To delete all the secrets related to Kafka, run the following
command:
kubectl delete secret --all -n <namespace> - To delete configmap used for Kafka, run the following
command:
kubectl delete configmap --all -n <namespace> - To delete PVCs used for Kafka,
- run the following command, and list the PVCs used in the
namespace:
kubectl get pvc -n <namespace> - run the following command, and delete the PVCs used by
the brokers and
zookeepers:
kubectl delete pvc --all -n <namespace>
- run the following command, and list the PVCs used in the
namespace:
6.1 Verifying Uninstallation
To verify the Oracle Communications Network Analytics Data Director (OCNADD) uninstallation, run the following command:
kubectl get all -n <release-namespace>In case of successful uninstallation, no OCNADD resource is displayed in the command output.
- Run the following command to delete all the objects:
- To delete all the Kubernetes
objects:
kubectl delete all --all -n <release-namespace>Caution:
The command deletes all the Kubernetes objects of the specified namespace. In case, you have created the RBAC resources and service accounts before the helm installation in the same namespace, and these resources are required, then do not delete them.
- To delete all the Kubernetes
objects:
- Run the following command to delete the specific
resources:
kubectl delete <resource-type> <resource-name> -n <release-namespace> - Run the following command to delete the Kubernetes
namespace:
kubectl delete namespace <release-namespace>Example:kubectl delete namespace ocnaddCaution:
The command removes all the resources or objects created in the namespace. Therefore, ensure that you run the command only when you want to delete the namespace completely.