In a Docker Swarm cluster, what is the primary responsibility of a manager node?
Think about which node controls the cluster and decides where containers run.
The manager node controls the swarm, schedules tasks, and manages cluster state. Worker nodes only run tasks assigned by managers.
What is the expected output of the command docker node ls when run on a manager node in a Docker Swarm?
docker node ls
Consider what information a manager node can access about the swarm.
The docker node ls command lists all nodes in the swarm with their roles and status.
Which sequence of commands correctly adds a new worker node to an existing Docker Swarm managed by a manager node?
Think about how you get the join token and then use it on the worker.
First, get the join token on the manager, then copy the full join command, run it on the worker, and finally verify the join on the manager.
A worker node fails to join the swarm and shows the error: Error response from daemon: rpc error: code = Unavailable desc = connection error: connection refused. What is the most likely cause?
Consider network connectivity between nodes.
The error indicates the worker cannot connect to the manager's swarm port (2377). Network issues or firewall blocking this port are common causes.
What is the recommended minimum number of manager nodes in a Docker Swarm cluster to ensure high availability and fault tolerance?
Think about quorum and consensus in distributed systems.
At least 3 manager nodes are recommended to maintain quorum and allow the swarm to tolerate one manager failure without losing cluster state.