Created
July 11, 2018 20:47
-
-
Save sarjarapu/59ce8866372b863d35a891e4773ace07 to your computer and use it in GitHub Desktop.
A bash script showing the connectivity to the MongoDB replica set member via mongo shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl -n ${K8_NAMESPACE} exec -it ${K8_NAMESPACE}-replicaset-0 -- bin/bash | |
# mongodb@mongodb-world-replicaset-0:/$ | |
/var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.6.5/bin/mongo | |
# MongoDB shell version v3.6.5 | |
# connecting to: mongodb://mongodb-world-replicaset-0:27017/ | |
# MongoDB server version: 3.6.5 | |
# mongodb-world-replicaset:PRIMARY> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment