Difficulty: intermediate
Estimated Time: 10-15 minutes

This scenario covers how to securely manage new nodes joining a Swarm Mode cluster. The scenario covers how to define a password for joining along with manually accepting nodes into the cluster.

By default, anyone who can communicate with a Swarm Master via port 2377 can join the cluster. This port should be locked down and restricted to only trusted machines.

On a large network with additional security requirements, companies might want to add additional security to ensure that only verified nodes are allowed.

Don’t stop now! The next scenario will only take about 10 minutes to complete.

Securely Joining Swarm Mode Cluster

Step 1 of 2

Step 1 - Initialise Swarm Mode

When the manager initialises the cluster, it generates a token. This token must be used when additional hosts want to join.

Task

Initialise the cluster using docker swarm init

In the next step, we will use the token so our second host can join.

Terminal Host 2