I deployed a MongoDB Community instance in a kubernetes environment with a custom dns, mydomain.fr instead of cluster.local.
My problem is that the generated connection string contains cluster.local and not the dns entered in my kubernetes cluster.
I have not found how to make sure that when creating the mongodb cluster, the connection string takes into account my dns (mydomain.fr).
the generated string contains:
mongodb-0.mongodb-svc.mongodb.svc.cluster.local:27017,mongodb-1.mongodb-svc.mongodb.svc.cluster.local:27017,mongodb-2.mongodb-svc.mongodb.svc.cluster.local:27017
It should be:
mongodb-0.mongodb-svc.mongodb.svc.mydomain.fr:27017,mongodb-1.mongodb-svc.mongodb.svc.mydomain.fr:27017,mongodb-2.mongodb-svc.mongodb.svc.mydomain.fr:27017
Except that this dns resolution does not exist within my cluster and the pods are not reachable.
The problem is identical with the standard srv.
Thank you in advance for your assistance.