Last updated 2 years ago
Note:
Docker has to be installed on the server
Docker swarm technology is already implemented into the docker installation
To install docker follow
Enable docker swarm on master node
sudo docker swarm init --advertise-addr <master_node>
This will print on screen a docker command that has to be run on every worker node
2. Run command on worker nodes
sudo docker swarm join --token <TOKEN_STRING> <master_node>
3. Verify if the nodes have actually joined the cluster successfully
sudo docker info
Notes:
To go more in depth about the nodes:
sudo docker node ls
To get the token again, run the command on the master node:
sudo docker swarm join-token manager