DCA study materials
DCA study resources

Docker Certified Associate: Orchestration

DCA ยท Work through your exam, one topic at a time.

All guide sections

Orchestration

Swarm objects nest

Swarm mode turns a set of Docker hosts into a cluster of managers (Raft consensus) and workers. Objects nest: a service declares desired state, the orchestrator creates tasks, and each task runs exactly one container. Replicated services run N copies; global services run one task per eligible node.

Core commands: docker swarm init --advertise-addr, docker swarm join-token manager|worker, docker node ls, docker node promote/demote, docker node update --availability drain, docker service create --replicas, docker service scale, docker service update --image, docker stack deploy -c compose.yml.

Rolling updates are governed by --update-parallelism (default 1), --update-delay, --update-failure-action pause|continue|rollback, with --rollback to revert. Health checks gate progress: a task failing its check stops the update.

Traps

Quorum is the classic one. An N-manager cluster tolerates floor((N-1)/2) failures, so two managers is worse than one - lose either and the cluster freezes. Use 1, 3, or 5. Draining a node reschedules its tasks but never deletes the node. docker-compose up --scale is not orchestration - questions that mix Compose and Swarm expect you to say so. docker stack deploy ignores build: in a Compose file. Overlay networks and swarm secrets exist only in swarm mode.

Worked example

To ship a new image with no downtime: docker service update --image myapp:2.1 --update-parallelism 2 --update-delay 10s web Swarm replaces two tasks at a time, waits 10 seconds, and pauses or rolls back if a replacement fails its health check.