Migrating Sharded MongoDB cluster to Kubernetes

Hello,
I’m trying to migrate a sharded MongoDB cluster to Kubernetes without downtime with approach similar to this.
I want this cluster to be managed by the Percona Operator (at the end, now I deploy it in unmanaged mode). I use the operator’s Helm chart.

Basically in the current step I want to deploy (3+1)*3 nodes in K8S (I have a 3 shard cluster) and add them to an existing cluster. A problem is that the operator does not support running multiple replicasets without sharding


and if I deploy them (in unmanaged mode) with sharding the communication starts between a config replicaset and the other ones which seems is not what I want and it fails due to hostname mismatch in certificates (for the time of migration I have certs for the external addresses only and they try to communicate on internal ones).

What are the advices for performing such migration? I haven’t found any document describing this scenario.

Hello @andi9310 ,

thank you for bringing this up.

Well, sharding per se is multiple replica sets. So you would need to have sharding enabled if you want to migrate multiple shards.
As for your question about domains and certificates - need more info about your topology. You can either share it here, or we can jump into a quick zoom call.