github.com/kobeld/docker@v1.12.0-rc1/docs/reference/commandline/swarm_leave.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "swarm leave"
     4  description = "The swarm leave command description and usage"
     5  keywords = ["swarm, leave"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  +++
     9  <![end-metadata]-->
    10  
    11  **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes.
    12  
    13  # swarm leave
    14  
    15  	Usage:	docker swarm leave
    16  
    17  	Leave a Swarm swarm.
    18  
    19  	Options:
    20  	      --help   Print usage
    21  
    22  This command causes the node to leave the swarm.
    23  
    24  On a manager node:
    25  ```bash
    26  $ docker node ls
    27  ID              NAME           STATUS  AVAILABILITY/MEMBERSHIP  MANAGER STATUS  LEADER
    28  04zm7ue1fd1q    swarm-node-02  READY   ACTIVE                                   
    29  2fg70txcrde2    swarm-node-01  READY   ACTIVE                   REACHABLE       
    30  3l1f6uzcuoa3 *  swarm-master   READY   ACTIVE                   REACHABLE       Yes
    31  ```
    32  
    33  On a worker node:
    34  ```bash
    35  $ docker swarm leave
    36  Node left the default swarm.
    37  ```
    38  
    39  On a manager node:
    40  ```bash
    41  $ docker node ls
    42  ID              NAME           STATUS  AVAILABILITY/MEMBERSHIP  MANAGER STATUS  LEADER
    43  04zm7ue1fd1q    swarm-node-02  DOWN    ACTIVE                                   
    44  2fg70txcrde2    swarm-node-01  READY   ACTIVE                   REACHABLE       
    45  3l1f6uzcuoa3 *  swarm-master   READY   ACTIVE                   REACHABLE       Yes
    46  ```
    47  
    48  ## Related information
    49  
    50  * [swarm init](swarm_init.md)
    51  * [swarm join](swarm_join.md)
    52  * [swarm update](swarm_update.md)