Syncing the mongodb operator between two datacenters


I am using mongodb operator and I was thinking it would be awesome if somehow I could connect the new mongodb that I am going to install to the existing mongodb installation that is running on another datacenter so that the two installations would have the exact same data and would replicate to eachother.

Is this possible and what are my choices?

Hello @zozotk ,

In our operator for Mongodb we provide the ability to add external nodes to your existing replica set. Also called cross site replication or multi cluster.

You can read more about it here: About Multi-cluster - Percona Operator for MongoDB

Is it what you are looking for?

Looks good. The question is since we expose the cluster and not the nodes via the LoadBalancer service how will I tell the other cluster the nodes from the other cluster?


All your nodes need to connect to each other, so you will have to expose your nodes somehow or provide other means of connectivity between them (like multi-cluster or some service mesh). Unfortunatelly it is just how MongoDB works.