I'm using Bitbani MongoDB helm charts, and I deployed Mongodb as a replicaset architecture.
I wanted to use one mongodb as a primary and mongo as secondary. replication should happen on secondary mongo, which is deployed in another GKE cluster.
Can anyone help me on this configuration.
I have deployed 2 mongodb is two clusters as replicset architecture. and try to executed below steps.
I saw some blogs they are saying run rs.initiate() command in primary cluster. But when I try to run it, its say already initiated.
and they said after initiation command run rs.slaveok() and rs.initiate({_id: "my-replicaset", members: [{_id: 0, host: "primary-mongodb:27017"}, {_id: 1, host: "secondary-mongodb:27017"}]})