Categories
Development MongoDB

Unable to connect with mongodb from internal kubernetes cluster

I tried setting up mongodb via bitnami stable/mongodb helm chart, the helm chart installation command is as follows –

helm install --name mongo --set mongodbRootPassword=mongo,mongodbUsername=mongo,mongodbPassword=mongo,mongodbDatabase=database stable/mongodb

after creation of it, I am looking to connect my applications by following format of connection string

mongodb://[user]:[password]@[service].[namespace].svc.cluster.local:27017/[db]?replicaSet=rs0&authSource=admin

But I am getting error for this –

failed to connect to server
[mongo.shift-resourcing.svc.cluster.local:27017] on first connect
[MongoNetworkError: Client network socket disconnected before secure
TLS connection was established
]

Leave an answer

Your email address will not be published. Required fields are marked *