liveBook · Manning

Docker Swarm manager node

As explained in Road to Kubernetes

A Docker Swarm manager node is a Swarm node that coordinates worker nodes, schedules tasks, and manages the cluster.

A Docker Swarm manager node coordinates a cluster of virtual machines: it tells worker nodes which tasks to run, schedules jobs, and manages the cluster. By default, a manager also acts as a worker. section 9.1

A Swarm deployment uses these related terms:

  • Worker node: runs the containers, called tasks, that the manager assigns. section 9.1
  • Task: a running container; once defined, it stays on its assigned node. section 9.1
  • Service: declares a task to execute across manager or worker nodes. section 9.1
  • Stack: collects services for deployment and is defined in a Docker Compose file. section 9.1

Configure the manager as the primary control point. In a three-node setup, create one manager and two workers; make changes through the manager while workers follow its instructions. Initialize it with docker swarm init --advertise-addr <private-ip-address>, then use the generated join token to add workers. section 9.1.1 section 9.1.3

Deploying application services

A manager can deploy a stack containing an NGINX load balancer, a Python web service, and a Node.js API service. Compose service names provide hostnames such as web and api, allowing NGINX to route requests while the manager coordinates placement across the cluster. section 9.1.1 section 9.1

Figure 9.2 Docker Swarm initialization output

Use the initialization output to find the worker join command and token returned by the manager. section 9.1.3

How Road to Kubernetes covers it

How deep it goes
Explains terminology, private-address initialization, worker joining, and a three-node setup, but defers detailed scheduling internals.
Examples
Uses one manager with two workers running NGINX, a containerized Python app, and a containerized Node.js app.
What it assumes
Assumes virtual machines, SSH, private IP addresses, and Docker installation; introduces Swarm roles and workflow directly.
What you can do after
Operate/configure a manager, initialize a Swarm, join workers, and prepare a Compose-defined stack for deployment.
How it connects
Connects Docker Compose, worker nodes, tasks, services, stacks, NGINX, and the Kubernetes control plane.

Also explained in

Compare how 2 books explain Docker Swarm manager node →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.