Unable to connection to mongodb container running on EKS cluster using pymongo

8/4/2021

Used this tutorial for mongodb StatefulSets creation.

I then ssh into my application container (where python was installed) and used the connection string URI from the tutorial but unable to connect to mongodb.

Tried following URI:

mongodb://mongo-0.mongo:27017/
mongodb://mongo-0.mongo.default.svc.cluster.local:27017/ 
mongodb://mongo-0.mongo.svc.cluster.local:27017/ 

Any suggestions what else can I try?

-- Harsh Upparwal
amazon-eks
kubernetes
mongodb
pymongo

0 Answers