2016-06-13 22:57:19 -04:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "swarm leave"
|
|
|
|
description = "The swarm leave command description and usage"
|
|
|
|
keywords = ["swarm, leave"]
|
2016-06-20 07:54:53 -04:00
|
|
|
advisory = "rc"
|
2016-06-13 22:57:19 -04:00
|
|
|
[menu.main]
|
|
|
|
parent = "smn_cli"
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
|
|
|
|
|
|
|
# swarm leave
|
|
|
|
|
2016-07-07 14:43:18 -04:00
|
|
|
```markdown
|
|
|
|
Usage: docker swarm leave [OPTIONS]
|
2016-06-13 22:57:19 -04:00
|
|
|
|
2016-07-07 14:43:18 -04:00
|
|
|
Leave a Swarm
|
2016-06-13 22:57:19 -04:00
|
|
|
|
2016-07-07 14:43:18 -04:00
|
|
|
Options:
|
|
|
|
--force Force leave ignoring warnings.
|
|
|
|
--help Print usage
|
|
|
|
```
|
2016-06-13 22:57:19 -04:00
|
|
|
|
|
|
|
This command causes the node to leave the swarm.
|
|
|
|
|
|
|
|
On a manager node:
|
|
|
|
```bash
|
|
|
|
$ docker node ls
|
2016-07-06 23:23:53 -04:00
|
|
|
ID HOSTNAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
2016-06-17 16:30:17 -04:00
|
|
|
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Ready Active
|
|
|
|
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
|
|
|
|
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
2016-06-13 22:57:19 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
On a worker node:
|
|
|
|
```bash
|
|
|
|
$ docker swarm leave
|
|
|
|
Node left the default swarm.
|
|
|
|
```
|
|
|
|
|
|
|
|
On a manager node:
|
|
|
|
```bash
|
|
|
|
$ docker node ls
|
2016-07-06 23:23:53 -04:00
|
|
|
ID HOSTNAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS LEADER
|
2016-06-17 16:30:17 -04:00
|
|
|
7ln70fl22uw2dvjn2ft53m3q5 worker2 Accepted Down Active
|
|
|
|
dkp8vy1dq1kxleu9g4u78tlag worker1 Accepted Ready Active Reachable
|
|
|
|
dvfxp4zseq4s0rih1selh0d20 * manager1 Accepted Ready Active Reachable Yes
|
2016-06-13 22:57:19 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
## Related information
|
|
|
|
|
|
|
|
* [swarm init](swarm_init.md)
|
|
|
|
* [swarm join](swarm_join.md)
|
|
|
|
* [swarm update](swarm_update.md)
|