Breadcrumbs

CX uninstallation

The purpose of this document is to uninstall the cim solution 

Uninstall Rancher ( only  if Rancher was installed )

To uninstall the rancher

it is a destructive command and will result in data loss.

Uninstall the Rancher UI  if it is installed

helm uninstall rancher -n cattle-system

and cert-manager 

helm uninstall cert-manager -n cert-manager

Uninstallation of External Components

PostgreSQL 

To delete the config map of PostgreSQL

kubectl -n ef-external delete configmap ef-postgresql-license-manager-cm 

it is a destructive command and will result in data loss.

To uninstall the  PostgreSQL

helm uninstall  ef-postgresql -n ef-external

Change the directory to Kubernetes

cd cim-solution/kubernetes

Keycloak

to delete the config map of keycloak.

kubectl delete -f pre-deployment/keycloak/ef-keycloak-configmap.yaml

it is a destructive command and will result in data loss.

To uninstall the  keycloak

helm uninstall  keycloak -n ef-external

Mongo

it is a destructive command and will result in data loss.

To uninstall the mongo

helm uninstall  mongo -n ef-external

Minio

it is a destructive command and will result in data loss.

to uninstall the minio

helm uninstall minio -n ef-external

Redis

it is a destructive command and will result in data loss.

to uninstall the redis

helm uninstall redis -n ef-external

Grafana

To delete the secret of grafana.

kubectl -n ef-external delete secret ef-grafana-datasource-secret 

To delete the dashboard provider configmap of grafana.

kubectl delete cm ef-grafana-dashboard-provider-cm -n ef-external 

To delete the garafana.ini configmap of grafana.

kubectl -n ef-external delete configmap ef-grafana-ini-cm 

it is a destructive command and will result in data loss.

To delete the grafana supervisor dashboards files.

MYSQL Dashboard
kubectl -n ef-external delete configmap ef-grafana-supervisor-dashboard-mysql
kubectl -n ef-external delete configmap ef-grafana-agent-dashboard-mysql
MSSQL Dashboard
ActionScript
kubectl -n ef-external delete configmap ef-grafana-supervisor-dashboard-mssql
kubectl  -n ef-external  delete configmap ef-grafana-agent-dashboard-mssql

To uninstall the grafana

helm uninstall grafana -n ef-external

Superset

to uninstall the superset

helm uninstall superset -n ef-bi

Deleting PVC will remove all the data and result in irrecoverable data. 

RASA-X 

To delete the redeployment of rasa-x.

kubectl delete -f pre-deployment/rasa-x-1.1.2/ef-rasa-x-nginx-standard-conf.yaml

Deleting PV will remove all the data and result in irrecoverable data. 

to uninstall the rasa-x

helm uninstall rasa-x -n  rasa-x   

Delete all the PVC for rasa-x

kubectl -n rasa-x delete persistentvolumeclaim/data-rasa-x-rabbit-0 persistentvolumeclaim/data-rasa-x-postgresql-0 persistentvolumeclaim/redis-data-rasa-x-redis-master-0

Remove TLS Secrets

To remove the applied secrets from ef-external namespace

kubectl delete -f external-tls-secrets/

To remove the applied secrets from expertflow namespace

kubectl delete secrets -n expertflow mongo-mongodb-ca redis-crt ef-postgresql-crt

Expertflow Components

Log Masking ConfigMaps

To delete the configmaps of log masking

kubectl delete -f pre-deployment/logback/
kubectl -n expertflow delete configmap ef-logback-cm

change the directory to cim

cd cim/

Conversation Manager ConfigMaps

To delete the configmaps of conversation manager

kubectl -n expertflow delete configmap ef-conversation-controller-actions-cm 
kubectl -n expertflow delete configmap ef-conversation-controller-actions-pycache-cm 
kubectl -n expertflow delete configmap ef-conversation-controller-actions-utils-cm 

Reporting Connector ConfigMaps

To delete the configmap of reporting connector

kubectl -n expertflow delete configmap ef-reporting-connector-conf
kubectl -n expertflow delete configmap ef-reporting-connector-cron

Delete App Translations based & all other configmap in the ConfigMaps folder using

kubectl delete configmap ef-app-translations-cm -n expertflow
kubectl delete -f ConfigMaps/

StatefulSet

To uninstall ActiveMQ

kubectl delete  -f StatefulSet/

Deployments

Delete all the Deployment manifests using

kubectl delete -f Deployments/

Services

Delete services for all deployment EF components

kubectl delete -f Services/

Ingress

To delete the Traefik-based ingress

kubectl delete -f Ingresses/traefik/

To delete the Nginx  based ingress

kubectl delete -f Ingresses/nginx/

PVC 

To delete the PVC of all the external components 

Before deleting the PVCs from the ef-external namespace, save the output to a variable.

EF_PV_LIST=$(kubectl -n ef-external get pvc -o custom-columns='PV:.spec.volumeName' --no-headers)

To delete the PVC of activeMQ

kubectl delete pvc -n ef-external  activemq-data-ef-amq-0

To delete the PVC of  postgreSQL

kubectl delete pvc -n ef-external data-ef-postgresql-0

To delete the PVC of the superset

kubectl delete pvc -n ef-external data-superset-postgresql-0

To delete the PVC of mongo

kubectl delete pvc -n ef-external datadir-mongo-mongodb-0

To delete the PVC of redis

kubectl delete pvc -n ef-external redis-data-redis-master-0

Deleting PV will remove all the data and result in irrecoverable data. 

Delete PV (Persistent volume)

To delete all persistent volumes.

kubectl delete pv ${EF_PV_LIST}