Add node1 to master

Now that we selected the leader, we will need to add a new node to the cluster to complete the setup. Log in to node1 and execute the following command, which is specified in the previous command output:

$ docker swarm join     --token SWMTKN-1-
1le69e43paf0vxyvjdslxaluk1a1mvi5lb6ftvxdoldul6k3dl-
1dr9qdmbmni5hnn9y3oh1nfxp master-ip-address:2377

You can refer to the following screenshot for an output:

This means our setup is successful. Let's check if it is added in the master Docker machine or not.

Execute the following command to verify it:

$ docker node ls 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.161.30