By default, Docker works as an isolated single-node. All containers are only deployed onto the engine. Swarm Mode turns it into a multi-host cluster-aware engine.
Task: Initialise Swarm Mode
To use the secrets functionality, Docker has to be in "Swarm Mode". This is enabled via
docker swarm init
In this scenario, we are using single node swarm cluster. We will create and test services. In the production environment, swarm mode provides a fault-tolerant platform with cluster management features to keep your services running and available.