how to mongodump using oc login code example
Example 1: mongodb container mongodump openshift
01) To view all MongoDB environment variables, from local computer run:
oc exec mongodb-XX-XXXXX env
Example 2: mongodb container mongodump openshift
02) To perform the dump, go to pod terminal in openshift console and enter this:
mongodump --host MONGODB_SERVICE_HOST:MONGODB_SERVICE_PORT --username admin --password "MONGODB_ADMIN_PASSWORD"