mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00

Signed-off-by: Charles Smith <charles.smith@docker.com>
(cherry picked from commit 78ebfaff1a
)
1.5 KiB
1.5 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.
swarm leave
Usage: docker swarm leave
Leave a Swarm swarm.
Options:
--help Print usage
This command causes the node to leave the swarm.
On a manager node:
$ docker node ls
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
On a worker node:
$ docker swarm leave
Node left the default swarm.
On a manager node:
$ docker node ls
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Down Active
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes