Mongo Replicaset Cleanup

If any issues are encountered while running the installMongoRS command, ensure that all traces of previous attempts are cleaned up before retrying by following these steps:
  1. Remove the Mongo Replicaset using the command below.
    helm uninstall avx-mongo-rs -n avx
  2. Delete the StatefulSet resource by executing the command below.
    kubectl delete sts avx-mongo-mongodb -n avx --force
  3. Delete the specified Kubernetes services (service objects) in the cluster by executing the command below.
    kubectl delete svc avx-mongo-mongodb-headless -n avx --force
  4. Delete the Mongo Replicaset related PVCs by executing the commands below.
    kubectl delete pvc avx-mongo-mongodb-persistent-storage-claim-avx-mongo-mongodb-0 avx-mongo-mongodb-persistent-storage-claim-avx-mongo-mongodb-1 avx-mongo-mongodb-persistent-storage-claim-avx-mongo-mongodb-2 -n avx --force
  5. Delete the Mongo Replicaset related kubernetes secrets using the commands below.
    kubectl delete secret mongo-key-rs -n avx --force