Skip to main content

SWARM

Docker Swarm is Docker's native clustering and orchestration tool, allowing you to manage a group of Docker engines across multiple nodes (hosts).


Initialise Docker Swarm manager node:
docker swarm init

Similar to K8S, in the output of this command, you'll receive instruction on how to join new nodes/workers to the cluster. Example output:

root@test:~# docker swarm init
Swarm initialized: current node (dcvjj4en1quys25r1w0qbjwsk) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-0lt1on0584jcniqni3ws93fs5whmghxiivwd9lh66f258swqc0-5wrcjm3a0jtn17ja1054xkpvm 192.168.1.106:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

Docker Services