The Problem, I think, is that inside the cluser, kubernetes update the dns with the right order to land on the new primary, but the client is not able to see the new right order.
How is it possible to do this?
Below the error I receive and the first server is the new primary.
But my client is not able to see the kubernetes dns and the only ip that i’m able to see is the ip address of the control plane.
SERVER [example-mongodb-2.example-mongodb-svc.mongodb.svc.cluster.local:27017] (Type: UNKNOWN)
|/ Connection error (MongoSocketOpenException): Exception opening socket
|___/ Unknown host: example-mongodb-2.example-mongodb-svc.mongodb.svc.cluster.local
SERVER [example-mongodb-0.example-mongodb-svc.mongodb.svc.cluster.local:27017] (Type: UNKNOWN)
|/ Connection error (MongoSocketOpenException): Exception opening socket
|___/ Unknown host: example-mongodb-0.example-mongodb-svc.mongodb.svc.cluster.local
SERVER [example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local:27017] (Type: UNKNOWN)
|/ Connection error (MongoSocketOpenException): Exception opening socket
|___/ Unknown host: example-mongodb-1.example-mongodb-svc.mongodb.svc.cluster.local