...

/

Initializing a New Swarm

Initializing a New Swarm

Let's initialize a new swarm and add nodes to it.

The process of building a swarm is called initializing a swarm. To create a Docker Swarm, you need to follow the multi-step initialization process given below:

  1. Initialize the first manager

  2. Join additional managers

  3. Join workers.

Swarm mode

Before a Docker node joins a swarm, it runs in single-engine mode and can only run regular containers. After joining a swarm, it switches into swarm mode and can run advanced containers called swarm services. More on services later.

When you run a docker swarm init command on a Docker node that’s currently in single-engine mode, Docker switches it into swarm mode, creates a new swarm, and makes the node the first manager of the swarm. You can then add more nodes as managers and workers, and these nodes also get switched into swarm mode.

Adding nodes to the cluster

You’re about to complete all of the ...

Access this course and 1400+ top-rated courses and projects.