Docker Swarm - Interview Questions

What is Docker Swarm?

 FAQ

Docker Swarm is an orchestration tool provided with Docker. With Docker Swarm you can manage, scale, and maintain containerized applications.

A Docker swarm contains multiple Docker hosts which run in swarm mode and can act as both managers as well as workers. Managers manage swarm memberships and workers run swarm services.

What are nodes in Swarm? What are the different kinds of nodes?

 FAQ

Nodes in Swarm are Docker instances running in swarm mode. There are two kinds of nodes - Manager nodes and Worker nodes.

Manager nodes are responsible for orchestration and cluster management functions, which helps maintain the desired state of the swarm. Manager nodes also dispatch units of work or tasks to worker nodes.

Worker nodes execute tasks that are dispatched to them by Manager nodes, and update the status back to the Manager node.

How do you specify the number of containers to run for a service using Docker Swarm?

 FAQ

You can use the Docker Swarm command docker service update with the parameter --replicas to specify the number of containers to run for a service.

For example below command creates 3 containers for the service myService

> docker service update myService --replicas 3
 
Subscribe to our Questions

 

DevOps - Interview Questions

DevOps BasicsGITJenkinsJFrogDockerDocker SwarmKubernetes
 
RECOMMENDED RESOURCES
Behaviorial Interview
Top resource to prepare for behaviorial and situational interview questions.

STAR Interview Example