MongoShardDB Cleanup

After completing the plugins upgrade and validating the functionality, it is necessary to clean up (delete) all traces of the MongoDB shard database setup. Follow the steps outlined below:
  1. Remove the Mongo ShardDB using the command below.
    helm uninstall avx-mongo -n avx
  2. Delete the StatefulSet resource by executing the command below.
    kubectl delete sts mongo-shareddb mongo-configdb mongo-routerdb -n avx --force
  3. Delete the specified Kubernetes services (service objects) in the cluster by executing the command below.
    kubectl delete svc mongo-shareddb-service mongo-configdb-service mongo-routerdb-service -n avx --force
  4. Delete the MongoShardDB related PVCs by executing the commands below.
    kubectl delete pvc mongo-configdb-persistent-storage-claim-mongo-configdb-0 mongo-configdb-persistent-storage-claim-mongo-configdb-1 mongo-configdb-persistent-storage-claim-mongo-configdb-2 -n avx --force
    kubectl delete pvc mongo-shareddb-persistent-storage-claim-mongo-shareddb-0 mongo-shareddb-persistent-storage-claim-mongo-shareddb-1 mongo-shareddb-persistent-storage-claim-mongo-shareddb-2 -n avx --force
  5. Delete the MongoShardDB related kubernetes secrets using the commands below.
    kubectl delete secret mongo-key -n avx --force