Swarm is an distributed app scheduler service.
A swarm consists of a cluster of Docker hosts (running in swarm mode) which act as:
- managers (to manage membership and delegation)
- workers (which run swarm services).
A given Docker host can be a manager, a worker, or perform both roles.
When you create a service, you define its optimal state (number of replicas, network and storage resources available to it, ports the service exposes to the outside world, and more). Docker works to maintain that desired state.
docker swarm init
- Take down a single node swarm from the manager
docker swarm leave --force