blob: e31d003d4fd09383fdf2812afff081d4e0202a44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<h1>docker stack rm</h1> <p><br></p> <p>Remove one or more stacks</p> <h2 id="usage">Usage</h2> <div class="highlight"><pre class="highlight" data-language="">$ docker stack rm [OPTIONS] STACK [STACK...]
</pre></div> <p>Refer to the <a href="#options">options section</a> for an overview of available <a href="#options"><code class="language-plaintext highlighter-rouge">OPTIONS</code></a> for this command.</p> <h2 id="description">Description</h2> <p name="extended-description">Remove the stack from the swarm.</p> <blockquote> <p><strong>Note</strong></p> <p>This is a cluster management command, and must be executed on a swarm manager node. To learn about managers and workers, refer to the <a href="../../../swarm/index">Swarm mode section</a> in the documentation.</p> </blockquote> <p>For example uses of this command, refer to the <a href="#examples">examples section</a> below.</p> <h2 id="options">Options</h2> <table> <thead> <tr> <td>Name, shorthand</td> <td>Default</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><code class="language-plaintext highlighter-rouge">--namespace</code></td> <td></td> <td>
<a href="../../../deprecated/index" target="_blank" rel="noopener" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a><span class="badge badge-info" data-toggle="tooltip" title="This option works for the Kubernetes orchestrator.">Kubernetes</span><br>Kubernetes namespace to use</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">--kubeconfig</code></td> <td></td> <td>
<a href="../../../deprecated/index" target="_blank" rel="noopener" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a><span class="badge badge-info" data-toggle="tooltip" title="This option works for the Kubernetes orchestrator.">Kubernetes</span><br>Kubernetes config file</td> </tr> <tr> <td><code class="language-plaintext highlighter-rouge">--orchestrator</code></td> <td></td> <td>
<a href="../../../deprecated/index" target="_blank" rel="noopener" class="_"><span class="badge badge-danger" data-toggle="tooltip" title="Read the deprecation reference (in a new window).">deprecated</span></a><br>Orchestrator to use (swarm|kubernetes|all)</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="remove-a-stack">Remove a stack</h3> <p>This will remove the stack with the name <code class="language-plaintext highlighter-rouge">myapp</code>. Services, networks, and secrets associated with the stack will be removed.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker stack rm myapp
Removing service myapp_redis
Removing service myapp_web
Removing service myapp_lb
Removing network myapp_default
Removing network myapp_frontend
</pre></div> <h3 id="remove-multiple-stacks">Remove multiple stacks</h3> <p>This will remove all the specified stacks, <code class="language-plaintext highlighter-rouge">myapp</code> and <code class="language-plaintext highlighter-rouge">vossibility</code>. Services, networks, and secrets associated with all the specified stacks will be removed.</p> <div class="highlight"><pre class="highlight" data-language="">$ docker stack rm myapp vossibility
Removing service myapp_redis
Removing service myapp_web
Removing service myapp_lb
Removing network myapp_default
Removing network myapp_frontend
Removing service vossibility_nsqd
Removing service vossibility_logstash
Removing service vossibility_elasticsearch
Removing service vossibility_kibana
Removing service vossibility_ghollector
Removing service vossibility_lookupd
Removing network vossibility_default
Removing network vossibility_vossibility
</pre></div> <h2 id="parent-command">Parent command</h2> <table> <thead> <tr> <th style="text-align: left">Command</th> <th style="text-align: left">Description</th> </tr> </thead> <tbody> <tr> <td style="text-align: left"><a href="../stack/index">docker stack</a></td> <td style="text-align: left">Manage Docker stacks</td> </tr> </tbody> </table> <h2 id="related-commands">Related commands</h2> <table> <thead> <tr> <td>Command</td> <td>Description</td> </tr> </thead> <tbody> <tr> <td><a href="../stack_deploy/index">docker stack deploy</a></td> <td>Deploy a new stack or update an existing stack</td> </tr> <tr> <td><a href="../stack_ls/index">docker stack ls</a></td> <td>List stacks</td> </tr> <tr> <td><a href="../stack_ps/index">docker stack ps</a></td> <td>List the tasks in the stack</td> </tr> <tr> <td><a href="index">docker stack rm</a></td> <td>Remove one or more stacks</td> </tr> <tr> <td><a href="../stack_services/index">docker stack services</a></td> <td>List the services in the stack</td> </tr> </tbody> </table> <div class="_attribution">
<p class="_attribution-p">
© 2019 Docker, Inc.<br>Licensed under the Apache License, Version 2.0.<br>Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.<br>Docker, Inc. and other parties may also have trademark rights in other terms used herein.<br>
<a href="https://docs.docker.com/engine/reference/commandline/stack_rm/" class="_attribution-link">https://docs.docker.com/engine/reference/commandline/stack_rm/</a>
</p>
</div>
|