Add mongo's new replica automatically to the mongo cluster

60 Views Asked by At

I have docker -swarm with 3 workers nodes (mongo container on each one). I configured mongo-cluster ("rs0"). When I scaled mongo service (eg. docker service scale test_mongo1=2) I saw new mongo's container but this mongo is not in the cluster.

How to configure mongo's service or mongo-cluster to add automatically new mongo's replica to the mongo cluster?

0

There are 0 best solutions below