I'm using mongodb replicaset in Azure Kubernetes. I have two pods running for mongodb. I have created a service to connect both pods, which is working perfectly fine. But looks like now it is giving error while connecting to secondary pod:
[amqp] Channel consume error: MongoError: not master errmsg: 'not master', code: 10107, codeName: 'NotMaster'
Can you please help me in case of I'm missing something
Source of MongoDB: Bitnami MongoDB Helm
I think you could try to use
externalAccess.enabled=true
parameter so you don't have to create the services manually. In combination with that, you could also useexternalAccess.autoDiscovery.enabled=true
.BTW, it could be good to see more details of your installation parameters and environment so that we could help better.