[ad_1]
Jack Wallen shows you the steps to join new nodes to a Docker swarm as a worker and manager to help you manage large Docker clusters.
Do you have Docker Swarm up and running and you need to add more nodes to it? You probably remember how the introduction to Docker Swarm presented you with the join command. The token that connects to that command can only be used once, so even if you copied that command to a file, it won’t work for a new node.
Fortunately, though, the Docker developers made it possible to add new nodes to Swarm at any time. To do this, you need to have Docker Swarm up and running with at least one controller node and a new node to join. You can add as many nodes as you want and can do so at any time.
You can join a node as a worker or manager. The difference is simple: a manager node elects a leader to conduct orchestration tasks, while worker nodes receive and execute tasks sent from manager nodes. Most likely, you will join the node as a worker, but I will show you the commands for both.
First, join a node as a worker. Log in to your Docker Swarm controller node, and issue the command docker swarm join-token worker, The output will include the docker swarm join command that you will run on the new worker node. If you need to generate a new token, use the rotate option as follows: docker swarm join-token --rotate worker,
Now, if you want to join a node as a manager, the command is docker swarm join-token manager, You can use the rotate option in the same way to generate a new join token docker swarm join-token --rotate manager,
Once you run one of those commands on your new node, it will join Swarm as a worker or manager, and you’re ready to grow and manage a large Docker cluster.
Subscribe to TechRepublic’s How to Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.










