Challenge - 5 Problems
Swarm Mode Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Swarm Initialization Output
What is the typical output when you run
docker swarm init successfully on a new Docker host?Docker
docker swarm initAttempts:
2 left
💡 Hint
Think about what message confirms the node became a manager and gives instructions for adding workers.
✗ Incorrect
When you run 'docker swarm init' on a fresh Docker host, it initializes the swarm and makes the node a manager. The output confirms this and provides the command to add worker nodes.
🧠 Conceptual
intermediate2:00remaining
Swarm Mode Initialization Requirements
Which of the following is a required condition before running
docker swarm init on a host?Attempts:
2 left
💡 Hint
Consider what is essential for Docker to manage containers and identify the node uniquely.
✗ Incorrect
To initialize a swarm, the Docker daemon must be running to manage containers, and the host needs a unique hostname to identify it in the swarm.
❓ Troubleshoot
advanced2:00remaining
Swarm Init Failure Due to Network Conflict
You run
docker swarm init but get the error: Error starting daemon: Error initializing network controller: Error creating default "bridge" network: network with name bridge already exists. What is the most likely cause?Attempts:
2 left
💡 Hint
Think about what the error message says about the 'bridge' network.
✗ Incorrect
The error indicates a network named 'bridge' already exists, which conflicts with swarm's attempt to create its default network. Removing or renaming the existing network resolves this.
🔀 Workflow
advanced3:00remaining
Steps to Add a Worker Node to a Swarm
After initializing a swarm on the manager node, what is the correct sequence of commands to add a new worker node to the swarm?
Attempts:
2 left
💡 Hint
Remember that worker nodes do not run 'docker swarm init'.
✗ Incorrect
The correct workflow is to get the join command from the manager, run it on the worker node, then verify on the manager. Worker nodes do not initialize swarm themselves.
✅ Best Practice
expert2:30remaining
Best Practice for Swarm Manager Node Initialization
Which practice is recommended when initializing a Docker Swarm manager node to ensure high availability and security?
Attempts:
2 left
💡 Hint
Think about how to protect swarm secrets and manager keys.
✗ Incorrect
Using the --autolock flag encrypts swarm keys at rest, requiring a key to unlock the swarm after manager restart, improving security and availability.