HostUnreachable while setting up mongo in kubernetes(EKS)

8/11/2021

I'm trying to set up MongoDB in k8s. I'm using mongo-sidecar to manage the replica sets. Im facing the following error,

{"t":{"$date":"2021-08-11T08:18:30.625+00:00"},"s":"I",  "c":"NETWORK",  "id":4712102, "ctx":"ReplicaSetMonitor-TaskExecutor","msg":"Host failed in replica set","attr":{"replicaSet":"rs0","host":"mongo-1.mongo.mongo.svc.cluster.local:27017","error":{"code":6,"codeName":"HostUnreachable","errmsg":"Error connecting to mongo-1.mongo.mongo.svc.cluster.local:27017 :: caused by :: Could not find address for mongo-1.mongo.mongo.svc.cluster.local:27017: SocketException: Host not found (authoritative)"},"action":{"dropConnections":true,"requestImmediateCheck":false,"outcome":{"host":"mongo-1.mongo.mongo.svc.cluster.local:27017","success":false,"errorMessage":"HostUnreachable: Error connecting to mongo-1.mongo.mongo.svc.cluster.local:27017 :: caused by :: Could not find address for mongo-1.mongo.mongo.svc.cluster.local:27017: SocketException: Host not found (authoritative)"}}}}

am I missing something?

-- coder here
amazon-eks
kubernetes
mongodb

0 Answers