Docker & Kubernetes · Module 06
Docker Swarm – Basic Orchestration
Join several Docker hosts into a swarm, understand manager and worker roles, then deploy and scale services by desired state.
What you will learn
- Tell managers from workers and explain Raft and quorum
- Initialise a swarm, add nodes and put a node into maintenance
- Create, scale and watch replicated or global services
Lessons
- Swarm mode — manager and worker nodes
A swarm joins several Docker hosts into a cluster; managers keep the cluster state with Raft and workers run containers.
- Creating and managing a swarm
docker swarm init creates a swarm and prints the join command; join-token prints it again; docker node manages nodes, and drain prepares maintenance.
- Services, tasks and deploying on a swarm
A service is a desired state; managers split it into tasks, and each task runs one container on one node.