Docker swarm interview questions
What you will learn here about Docker Swarm
- Docker swarm interview questions
Docker swarm interview questions
Docker swarm most common asked interview questions are given below
1)The Docker command to list the secrets is
- None of the options
- docker secret ls
- docker secret ps
- docker ls
2)The Docker Swarm command to inspect the new swarm service created is _ _ _ _
- docker service inspect <service-name>
- docker inspect <service-name>
- docker swarm service inspect <service-name>
- None of the options
3)The maximum number of tasks that can be executed in a Drain node is _ _ _ _
- 3
- 0
- 1
- 2
Answer: 0
4)The Docker Swarm command to scale an existing service by five instances is _ _ _ _
- docker service scale <service-name>=5
- docker service <service-name> count=5
- docker service <service-name> scale=5
- None of the options
5)The Docker Swarm command to activate a drain worker node is _ _ _ _
- docker update <worker-node> – -availability=active
- docker node update <worker-node> active
- docker node update <worker-node> – -availability=active
- None of the options
6) _ _ _ _ in the worker node executes the task on behalf of the worker node.
- Worker
- Executor
- Scheduler
- None of the options
7)The Docker Swarm command to remove a service is _ _ _ _
- docker service remove <service-name>
- docker service rm <service-name>
- docker service delete <service-name>
- None of the options
8)The following are correct types of service deployments for Docker Swarm, except _ _ _ _
- Global
- Series
- Replicated
- None of the options
9)The Swarm task status when the task is initialized is _ _ _ _
- New
- Assigned
- Initialized
- Starting
10)The following are valid ways to create a docker service, except
- UCP Web UI
- Docker Swarm CLI
- UCB Web UI
- None of the options
11)Assume a Swarm cluster has 7 Swarm managers. The system can tolerate _ _ _ _ number of failures.
- 4
- 2
- 3
- None of the options
12)The Manager node can also act as a worker node
- False
- True
13)The Docker Swarm command to list the tasks running on the manager node is _ _ _ _
- docker node ps self
- docker service ps self
- docker swarm ls self
- None of the options
14)When a task stops, it is not executed again, and a new task may take its place.
- True
- False
15)The following are valid ways to configure a pending service, except _ _ _ _
- Adding placement constraints on service
- Scaling the service to 0
- Configuring the memory allocation for the service that does not match any node
- All the options
- None of the options
16)The following are correct with respect to the output of the command $docker service create –name Test — secret secret1 redis, except _ _ _ _
- It creates a service with a secret for the Redis image
- It creates a Redis image for a service
- It creates a service for the Redis image
- All the options
17)The bridge network that connects host ports to container ports in an overlay network is _ _ _ _
- docker gwbridge network
- User defined network
- ingress network
- None of the options
18)What happens to the current task when the availability of the Active node is modified as Drain Node?
- Task terminates abruptly
- Task is paused
- Task Fails
- Task continues to run
19)The number of tokens generated when the master node is initialized in Swarm mode is _ _ _ _
- 1
- 2
- 0
20)The Docker Swarm command to autolock swarm, when initialized is _ _ _ _
- docker swarm autolock
- docker swarm init – -autolock
- docker swarm init -lock
- None of the options
21)The Worker Node is responsible for container orchestration
- True
- False
22)In Docker Swarm, all communication between nodes happens through the Transport Layer Security
- False
- True
23)Global service runs one task per worker node
- False
- True
24)Swarm task is _ _ _ _
- Unidirectional
- Bidirectional
25)In Docker Swarm, you can define the task and container relationship as _ _ _ _
- one to one
- one to many
- No relation
- many to one