Docker Certified Associate Exam Course
Docker Engine Enterprise
Demo Add worker node to UCP
In this guide, you’ll learn how to seamlessly scale your Docker Universal Control Plane (UCP) cluster by adding a new worker node. We’ll cover:
- Installing Docker Enterprise Engine on the new CentOS host
- Retrieving the Swarm join command from the UCP web console
- Running the join command on the new server
- Verifying the node in both the UCP console and via the Docker CLI
1. Install Docker Enterprise Engine on the New Node
Begin by installing Docker Enterprise Engine on your CentOS machine. Follow the official Docker Engine Enterprise Documentation and select Linux → CentOS.
Once installation completes, SSH into your new host (for example, ucp-worker
) and start Docker:
sudo systemctl start docker
sudo systemctl enable docker
sudo systemctl status docker
docker --version
You should see output similar to:
Docker version 19.03.x, build <hash>
Note
Ensure your Docker Enterprise Engine version matches the versions running on existing UCP managers to avoid compatibility issues.
2. Retrieve the Swarm Join Command from UCP
- Log in to your UCP web console.
- Go to Shared Resources → Nodes → Add Node.
- Under Node Type, choose Linux.
- Under Node Role, select Worker Node.
UCP will generate a docker swarm join
command similar to:
docker swarm join \
--token SWMTKN-1-4liabct184f4mxm03b2rwh0z02m1unv82p8fscdmp1pz1otwr-6ogugl8f0wmj5zmggid1hjuz \
172.31.32.217:2377
Warning
Keep your Swarm join token secret. Treat it like a password and do not expose it in public repositories.
3. Join the Node to the Docker Swarm
On your new CentOS host, copy and run the command provided by UCP:
sudo docker swarm join \
--token SWMTKN-1-4liabct184f4mxm03b2rwh0z02m1unv82p8fscdmp1pz1otwr-6ogugl8f0wmj5zmggid1hjuz \
172.31.32.217:2377
A successful join will return:
This node joined a swarm as a worker.
4. Verify the Worker Node in UCP
In the UCP Web Console
- Navigate back to Shared Resources → Nodes.
- Confirm your new host appears with Role: worker and Status: Ready.
Via the Docker CLI
On any existing manager node, run:
docker node ls
ID | HOSTNAME | STATUS | AVAILABILITY | MANAGER STATUS |
---|---|---|---|---|
xyz1234567890abcdef | ucp-manager | Ready | Active | Leader |
abc0987654321fedcba | ucp-worker | Ready | Active | — |
Next Steps
Repeat these steps for each additional worker or manager you wish to add. Scaling your UCP cluster enhances fault tolerance and distributes workload effectively.
References
Watch Video
Watch video content