Docker Swarm nodes: inspect, drain, label, promote, and demote
Answer: On a manager, you can inspect swarm nodes, change availability, add labels, and promote or demote roles.
Availability and manager status
Under Pause, existing tasks remain running, and the scheduler does not assign new tasks to the node.
Drain means the scheduler does not assign new tasks, and it shuts down existing tasks and schedules them on an available node.
Leader marks the primary manager that makes orchestration decisions.
Reachable means the node is a manager node participating in the Raft consensus quorum.
Labels, promote, and demote
Node labels can appear in service constraints that limit where tasks land.
docker node update --label-add sets label metadata; the flag takes a key or a key=value pair.
These node labels are not the same as dockerd engine labels.
You can promote a worker to manager or demote a manager to worker, but you must keep a manager quorum.
See also
Claims
- id: C1 claim: A paused node keeps running tasks but takes no new ones. source: S1 evidence: "Pause a node so it can't receive new tasks."
- id: C2 claim: Node labels can be used in service constraints. source: S1 evidence: "You can also use node labels in service constraints."
- id: C3 claim: A leader is the primary manager for orchestration decisions. source: S2 evidence: "the node is the primary manager node"
- id: C4 claim: A manager quorum must be maintained. source: S2 evidence: "you must always maintain a quorum of manager nodes"
Sources
- [S1] Manage nodes in a swarm. Docker, Inc.. https://docs.docker.com/engine/swarm/manage-nodes/ . License: Apache License 2.0. Accessed 2026-11-26.
- [S2] Manage nodes in a swarm (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/swarm/manage-nodes.md . License: Apache License 2.0. Accessed 2026-11-26.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Manage nodes in a swarm; Docker, Inc., Manage nodes in a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Manage nodes in a swarm; Docker, Inc., Manage nodes in a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "Docker Swarm nodes: inspect, drain, label, promote, and demote." iinventedlight Library, iil:note:yyhyvsdr, version of 2026-11-26. https://iinventedlight.com/library/notes/docker-swarm-manage-nodes/. License: CC-BY-4.0.
@misc{iil_note_yyhyvsdr,
author = {{iinventedlight}},
title = {{Docker Swarm nodes: inspect, drain, label, promote, and demote}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-26},
url = {https://iinventedlight.com/library/notes/docker-swarm-manage-nodes/},
note = {Permanent ID iil:note:yyhyvsdr. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-swarm-manage-nodes.schema.json (schema; CC-BY-4.0)
- docker-swarm-manage-nodes.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-swarm-manage-nodes.md.