Skip to main content
Skip table of contents

Collection Removal from MongoDB

Follow the below mentioned steps to delete the collection(s) from MongoDB . Incase , it is required.

Step 1 : Get pod

CODE
kubectl get pods -n ef-external


Step 2 : Log-in to mongoDB pod

Command format :

CODE
kubectl exec -it <pod-name> -n <namespace> -- mongosh

Example command :

CODE
kubectl exec -it mongo-mongodb-0 -n ef-external -- mongosh

Step 3 : Delete collection

i) To list all databases 
CODE
show dbs;
ii) Use any database on which you want to perform any operation.
CODE
use conversation-manager_db;
iii) To list all collections in the selected database.
CODE
show collections;
iv) Now you can drop the required collection.
CODE
 db.CustomerTopicEvents.drop();


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.