snippetbashTip
docker swarm — A container orchestration tool. More information: <https://docs.docker.com/engine/swarm/>.
Viewed 0 times
commanddocker swarmclimoreinformationtoolcontainerorchestration
Problem
How to use the
docker swarm command: A container orchestration tool. More information: <https://docs.docker.com/engine/swarm/>.Solution
docker swarm — A container orchestration tool. More information: <https://docs.docker.com/engine/swarm/>.Initialize a swarm cluster:
docker swarm initDisplay the token to join a manager or a worker:
docker swarm join-token {{worker|manager}}Join a new node to the cluster:
docker swarm join --token {{token}} {{manager_node_url:2377}}Remove a worker from the swarm (run inside the worker node):
docker swarm leaveDisplay the current CA certificate in PEM format:
docker swarm caRotate the current CA certificate and display the new certificate:
docker swarm ca --rotateChange the valid period for node certificates:
docker swarm update --cert-expiry {{hours}}h{{minutes}}m{{seconds}}sCode Snippets
Initialize a swarm cluster
docker swarm initDisplay the token to join a manager or a worker
docker swarm join-token {{worker|manager}}Join a new node to the cluster
docker swarm join --token {{token}} {{manager_node_url:2377}}Remove a worker from the swarm (run inside the worker node)
docker swarm leaveDisplay the current CA certificate in PEM format
docker swarm caContext
tldr-pages: common/docker swarm
Revisions (0)
No revisions yet.