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 Environment
(OCCNE) version of kube-api server.
Caution:
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:
Helm 2:
helm delete --purge <release_name> --namespace <namespace>Helm 3:
helm3 uninstall <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.
Clean 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@'%';
Clean 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 -n <namespace> <secretname> <secretname>Note:
To delete multiple secrets simultaneously, run the following command:kubetl delete secret kafka-broker1-secret kafka-broker2-secret kafka-broker3-secret kafka-broker3-secret jaas-secret ocnaddadminservice-secret -n ocnadd - To delete configmap used for Kafka, run the following
command:
kubectl delete configmap allfiles-configmap -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 broker1-pvc-kafka-broker1-0 broker2-pvc-kafka-broker2-0 broker3-pvc-kafka-broker3-0 kafka-broker-security-zookeeper-0 kafka-broker-security-zookeeper-1 kafka-broker-security-zookeeper-2 -n <namespace>
- run the following command, and list the PVCs used in the
namespace:
Delete Cluster Role and Cluster Rolebindings
- To list the cluster roles in the namespace, run the following
command:
kubectl get clusterrole | grep <namespace> - To delete the cluster roles, run the following
command:
kubectl delete clusterrole <name of clusterrole> - To list the cluster rolebindings, run the following
command:
kubectl get clusterrolebinding | grep <namespace> - To delete the cluster rolebindings, run the following
command:
kubectl delete clusterrolebinding <name of clusterrolebinding>
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 Kubernete
objects:
kubectl delete all --all -n <release-namespace> - To delete all the
configmaps:
kubectl delete cm --all -n <release-namespace>Caution:
The commands delete 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 Kubernete
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.