0
0
Dockerdevops~20 mins

Manager and worker nodes in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Swarm Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Role of Manager Node in Docker Swarm

In a Docker Swarm cluster, what is the primary responsibility of a manager node?

AScheduling tasks and managing cluster state
BOnly running containers without managing the cluster
CStoring container images locally
DProviding network access to containers
Attempts:
2 left
💡 Hint

Think about which node controls the cluster and decides where containers run.

💻 Command Output
intermediate
2:00remaining
Output of 'docker node ls' on Manager Node

What is the expected output of the command docker node ls when run on a manager node in a Docker Swarm?

Docker
docker node ls
ALists all nodes in the swarm with their status and roles
BShows only the current node's status
CReturns an error if run on a worker node
DDisplays running containers on the node
Attempts:
2 left
💡 Hint

Consider what information a manager node can access about the swarm.

🔀 Workflow
advanced
3:00remaining
Joining a Worker Node to a Docker Swarm

Which sequence of commands correctly adds a new worker node to an existing Docker Swarm managed by a manager node?

A2,1,3,4
B1,3,2,4
C1,2,3,4
D3,2,1,4
Attempts:
2 left
💡 Hint

Think about how you get the join token and then use it on the worker.

Troubleshoot
advanced
2:30remaining
Error When Worker Node Fails to Join Swarm

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?

AThe worker node has an incorrect Docker version
BThe worker node cannot reach the manager node on port 2377
CThe join token is expired after 24 hours
DThe worker node is already part of another swarm
Attempts:
2 left
💡 Hint

Consider network connectivity between nodes.

Best Practice
expert
2:00remaining
Ensuring High Availability of Manager Nodes

What is the recommended minimum number of manager nodes in a Docker Swarm cluster to ensure high availability and fault tolerance?

A1
B2
C5
D3
Attempts:
2 left
💡 Hint

Think about quorum and consensus in distributed systems.