mirror of https://github.com/docker/cli.git
Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
This commit is contained in:
parent
71f2e0f2a4
commit
f314ccfb47
|
@ -11,7 +11,7 @@ parent = "smn_cli"
|
||||||
# node rm
|
# node rm
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
Usage: docker node rm NODE [NODE...]
|
Usage: docker node rm [OPTIONS] NODE [NODE...]
|
||||||
|
|
||||||
Remove one or more nodes from the swarm
|
Remove one or more nodes from the swarm
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ Aliases:
|
||||||
rm, remove
|
rm, remove
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
--force Force remove an active node
|
||||||
--help Print usage
|
--help Print usage
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -30,6 +31,24 @@ Example output:
|
||||||
$ docker node rm swarm-node-02
|
$ docker node rm swarm-node-02
|
||||||
Node swarm-node-02 removed from swarm
|
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:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ 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.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ 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.
|
||||||
|
|
||||||
## Related information
|
## Related information
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue