# MongoDB cross-replication DNS entries

**URL:** <https://forums.percona.com/t/mongodb-cross-replication-dns-entries/15516>\
**Category:** Percona Operator for MongoDB\
**Created:** [May 3, 2022, 6:15am UTC](https://forums.percona.com/t/mongodb-cross-replication-dns-entries/15516 "2022-05-03T06:15:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dompablo](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@dompablo](https://forums.percona.com/u/dompablo)\
**Post date:** [May 3, 2022, 6:15am UTC](https://forums.percona.com/t/mongodb-cross-replication-dns-entries/15516/1 "2022-05-03T06:15:15Z")

</div>

Good morning,

I am testing the version of MongoDB in Kubenetes through the operator to distribute a cluster between two regions. Region A will contain part of the replica set and the other region the other part.

As it appears in the documentation, I expose the services as loadbalancers that generate some IPS that I then associate to the main clutser so that the replication begins.

My question is whether it is possible to assign the DNS entries to the IPs of these balancers through the operator to fully automate the process.

I don’t see a field where an annotation can be assigned to create them in Helm values. And if I want to create the services with another YAML, the operator tells me that if I use external nodes I have to enable the services, which doubles the number of services.

Thank you

---

<div class="post-metadata">

**Author:** ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)\
**Post date:** [May 9, 2022, 9:21am UTC](https://forums.percona.com/t/mongodb-cross-replication-dns-entries/15516/2 "2022-05-09T09:21:35Z")

</div>

Hey @dompablo ,

for now we do not automate the creation of DNS entries as we focus more on database piece.  
I think you can easily automate it by integrating with [external-dns](https://github.com/kubernetes-sigs/external-dns). It does the job 🙂

As for exposing each node and doubling the number of services - it is how it is now, as replica sets must form a full mesh and talk to each other.

As a workaround I suggest you look at [Multi-Cluster Services (MCS)](https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/1645-multi-cluster-services-api). Also see GKE implementation [here](https://cloud.google.com/kubernetes-engine/docs/concepts/multi-cluster-services).

We have support for MCS starting [Operator 1.12](https://www.percona.com/doc/kubernetes-operator-for-psmongodb/RN/Kubernetes-Operator-for-PSMONGODB-RN1.12.0.html). You can avoid using load balancers and doubling down the services.  
Read more here: [Set up Percona Server for MongoDB cross-site replication](https://www.percona.com/doc/kubernetes-operator-for-psmongodb/replication.html#operator-replication-mcs)

Please let me know your thoughts.
