Docker Associate Docker Swarm Orchestration Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 11 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. In Docker Swarm, what is the default scheduling mode for services?

Explanation

Docker Swarm’s default scheduler spreads service tasks across eligible nodes, helping balance workloads and avoid concentrating replicas on a small number of machines. Placement still depends on factors such as node availability, resource requirements, and any placement constraints specified for the service.

Submit
Please wait...
About This Quiz
Docker Associate Docker Swarm Orchestration Quiz - Quiz

This quiz evaluates your understanding of Docker Swarm orchestration, a core component of the Docker Certified Associate certification. It covers swarm initialization, service management, node roles, networking, and high-availability configurations. Master these concepts to deploy and manage containerized applications at scale in production environments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. What is the purpose of rolling updates in Docker Swarm?

Explanation

Rolling updates replace service tasks in batches rather than all at once. This lets the service continue handling requests during deployment, reducing downtime while new versions are introduced and giving operators a chance to detect issues before the update is complete.

Submit

3. How do you update a running service with a new image in Docker Swarm?

Explanation

Use `docker service update --image newimage:tag myservice` to change the image used by the Swarm service. Docker then updates the service’s tasks to run containers from the new image, following the service’s update configuration.

Submit

4. Which port does Docker Swarm use for node communication by default?

Explanation

Docker Swarm uses TCP port 2377 by default for cluster management and coordination between nodes, including communication with manager nodes. Other Swarm networking ports serve different purposes, such as node discovery and overlay network traffic.

Submit

5. What happens when a manager node loses quorum in a Swarm?

Explanation

When a Swarm loses manager quorum, its existing services and tasks continue running on worker nodes. However, managers cannot reliably make or commit orchestration changes, such as deploying services or rescheduling tasks. Restoring quorum by bringing enough managers back online restores the ability to manage the Swarm.

Submit

6. Which Docker Swarm feature ensures a service always has the desired number of replicas?

Explanation

Desired state reconciliation continuously compares the service’s actual state with its configured desired state, such as the number of replicas. If replicas fail or become unavailable, Swarm takes action to restore the requested count, helping keep the service running as specified.

Submit

7. In Docker Swarm, what is a stack?

Explanation

A stack groups related services that work together as an application. In Docker Swarm, you define these services and their configuration in a Compose file, then deploy the file to manage them as a single unit.

Submit

8. How do you join an existing Docker Swarm as a worker node?

Explanation

A worker joins an existing Docker Swarm by running the `docker swarm join` command with the worker join token and the manager’s IP address. Port `2377` is the default Swarm management port used to communicate with the manager and register the node in the cluster.

Submit

9. What is the purpose of Docker Swarm's internal DNS?

Explanation

Docker Swarm’s internal DNS lets services find and communicate with one another using service names instead of hard-coded IP addresses. It resolves those names to the appropriate service endpoints within the swarm, supporting reliable service discovery as containers are added, removed, or moved between nodes.

Submit

10. Which command scales a service to a specific number of replicas?

Explanation

Both `docker service scale myservice=5` and `docker service update --replicas=5 myservice` set the desired replica count for the Docker Swarm service `myservice` to five. Swarm then adjusts the running tasks to match that target. `docker swarm scale` is not a valid command for scaling an individual service.

Submit

11. What command initializes a Docker Swarm?

Explanation

The `docker swarm init` command initializes Docker Swarm mode on the current Docker host, making it the manager node for a new swarm. It also provides join tokens that other nodes can use to connect as workers or managers.

Submit

12. What does the --global flag do when creating a Docker Swarm service?

Explanation

The `--global` flag configures a Swarm service to run exactly one task on every eligible node. When a node joins or leaves the swarm, Docker adjusts the tasks to maintain one per node.

Submit

13. Which placement constraint restricts services to nodes with specific labels?

Explanation

The `node.labels` placement constraint limits a service to nodes that have specified labels. For example, `node.labels.region == east` schedules tasks only on nodes labeled `region=east`, helping target services to particular groups of nodes.

Submit

14. How do you drain a node in Docker Swarm without losing running tasks?

Explanation

Run `docker node update --availability drain `. This marks the selected Swarm node unavailable for new task placement and causes its existing service tasks to be rescheduled on active nodes, allowing services to continue running elsewhere. It is a graceful maintenance operation; the node remains part of the swarm.

Submit

15. What is the purpose of the Raft consensus algorithm in Docker Swarm?

Explanation

Raft is the consensus protocol Docker Swarm uses among manager nodes to replicate and agree on cluster state, such as services and task assignments. This keeps managers consistent and helps the cluster continue operating if a manager fails. It does not route container traffic, encrypt node communication, or allocate CPU resources.

Submit

16. Which Docker Swarm networking driver provides automatic load balancing?

Explanation

The overlay driver creates a virtual network that connects containers running on different Swarm nodes. Swarm can use this network with its routing mesh to distribute incoming service traffic across available task replicas, providing automatic load balancing while allowing services to communicate across hosts.

Submit

17. What is the primary difference between a service and a task in Docker Swarm?

Explanation

A service defines the desired state for an application in a Swarm, including its image, replicas, and configuration. Swarm uses that blueprint to create and manage tasks. Each task is an individual scheduled container instance, which may be replaced if it fails or needs rescheduling.

Submit

18. Which command promotes a worker node to manager?

Explanation

`docker node update --role manager ` changes the specified Swarm node’s role to manager, giving it manager-level responsibilities. Replace `` with the worker’s name or ID.

Submit

19. How many manager nodes are recommended in a production Swarm cluster?

Explanation

An odd number of manager nodes helps Swarm maintain quorum for leader election and cluster updates if some managers fail. With 3 managers, the cluster can tolerate 1 failure; with 5, it can tolerate 2. Odd-sized groups also avoid adding a manager that provides no additional failure tolerance compared with the preceding even number.

Submit

20. In Docker Swarm, what is the primary role of a manager node?

Explanation

A manager node maintains the Swarm’s desired and current state, schedules services across the cluster, and coordinates worker nodes. This lets the cluster deploy, scale, and recover services as needed.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
In Docker Swarm, what is the default scheduling mode for services?
What is the purpose of rolling updates in Docker Swarm?
How do you update a running service with a new image in Docker Swarm?
Which port does Docker Swarm use for node communication by default?
What happens when a manager node loses quorum in a Swarm?
Which Docker Swarm feature ensures a service always has the desired...
In Docker Swarm, what is a stack?
How do you join an existing Docker Swarm as a worker node?
What is the purpose of Docker Swarm's internal DNS?
Which command scales a service to a specific number of replicas?
What command initializes a Docker Swarm?
What does the --global flag do when creating a Docker Swarm service?
Which placement constraint restricts services to nodes with specific...
How do you drain a node in Docker Swarm without losing running tasks?
What is the purpose of the Raft consensus algorithm in Docker Swarm?
Which Docker Swarm networking driver provides automatic load...
What is the primary difference between a service and a task in Docker...
Which command promotes a worker node to manager?
How many manager nodes are recommended in a production Swarm cluster?
In Docker Swarm, what is the primary role of a manager node?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!