mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
Signed-off-by: Diogo Monica <diogo.monica@gmail.com> (cherry picked from commit a327c231b5c68c13b7dcde2fdc83b8e4cec59c43) Signed-off-by: Tibor Vass <tibor@docker.com>
1.4 KiB
1.4 KiB
Warning: this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes.
node rm
Usage: docker node rm [OPTIONS] NODE [NODE...]
Remove one or more nodes from the swarm
Aliases:
rm, remove
Options:
--force Force remove an active node
--help Print usage
Removes specified nodes from a swarm.
Example output:
$ docker node rm swarm-node-02
Node swarm-node-02 removed from swarm
Removes nodes from the swarm that are in the down state. Attempting to remove an active node will result in an error:
$ docker node rm swarm-node-03
Error response from daemon: rpc error: code = 9 desc = node swarm-node-03 is not down and can't be removed
If a worker node becomes compromised, exhibits unexpected or unwanted behavior, or if you lose access to it so that a clean shutdown is impossible, you can use the force option.
$ docker node rm --force swarm-node-03
Node swarm-node-03 removed from swarm
Note that manager nodes have to be demoted to worker nodes before they can be removed from the cluster.