'How can I deploy one mongodb replica cross different K8S clusters via Rancher?

I am using Rancher to deploy application cross multiple clusters. I have two clusters, one on EKS AWS, the other is on GCP. What I am trying to do is to deploy a mongodb replicaset on both clusters. There is only one mongodb replicaset but the replica members are from different clusters.

I can deploy a mongodb replicaset on two clusters via Rancher. But I found they work separately in AWS and GCP. How can I join them together to form up one mongodb replica?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source