Creating a MongoDB ReplicaSet

Follow these steps to create the ReplicaSet:

  1. First, let's create a Docker network called mongo-cluster for the new cluster using the docker network create command:
docker network create --driver nat mongo-cluster
If you would like to learn more about Docker networks, please refer to the official documentation: For Windows-specific documentation, please go to

We will use Azure Files SMB share (globally mapped to the G: drive), which we created in the previous section, in order to store MongoDB's state using bind mounts.

  1. We need to create new directories in our ...

Get Hands-On Kubernetes on Windows now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.