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

  1. None of the options
  2. docker secret ls
  3. docker secret ps
  4. docker ls

2)The Docker Swarm command to inspect the new swarm service created is _ _ _ _

  1. docker service inspect <service-name>
  2. docker inspect <service-name>
  3. docker swarm service inspect <service-name>
  4. None of the options

3)The maximum number of tasks that can be executed in a Drain node is _ _ _ _

  1. 3
  2. 0
  3. 1
  4. 2

Answer: 0

4)The Docker Swarm command to scale an existing service by five instances is _ _ _ _

  1. docker service scale <service-name>=5
  2. docker service <service-name> count=5
  3. docker service <service-name> scale=5
  4. None of the options

5)The Docker Swarm command to activate a drain worker node is _ _ _ _

  1. docker update <worker-node> – -availability=active
  2. docker node update <worker-node> active
  3. docker node update <worker-node> – -availability=active
  4. None of the options

6) _ _ _ _ in the worker node executes the task on behalf of the worker node.

  1. Worker
  2. Executor
  3. Scheduler
  4. None of the options

7)The Docker Swarm command to remove a service is _ _ _ _

  1. docker service remove <service-name>
  2. docker service rm <service-name>
  3. docker service delete <service-name>
  4. None of the options

8)The following are correct types of service deployments for Docker Swarm, except _ _ _ _

  1. Global
  2. Series
  3. Replicated
  4. None of the options

9)The Swarm task status when the task is initialized is _ _ _ _

  1. New
  2. Assigned
  3. Initialized
  4. Starting

10)The following are valid ways to create a docker service, except

  1. UCP Web UI
  2. Docker Swarm CLI
  3. UCB Web UI
  4. None of the options

11)Assume a Swarm cluster has 7 Swarm managers. The system can tolerate _ _ _ _ number of failures.

  1. 4
  2. 2
  3. 3
  4. None of the options

12)The Manager node can also act as a worker node

  1. False
  2. True

13)The Docker Swarm command to list the tasks running on the manager node is _ _ _ _

  1. docker node ps self
  2. docker service ps self
  3. docker swarm ls self
  4. None of the options

14)When a task stops, it is not executed again, and a new task may take its place.

  1. True
  2. False

15)The following are valid ways to configure a pending service, except _ _ _ _

  1. Adding placement constraints on service
  2. Scaling the service to 0
  3. Configuring the memory allocation for the service that does not match any node
  4. All the options
  5. 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 _ _ _ _

  1. It creates a service with a secret for the Redis image
  2. It creates a Redis image for a service
  3. It creates a service for the Redis image
  4. All the options

17)The bridge network that connects host ports to container ports in an overlay network is _ _ _ _

  1. docker gwbridge network
  2. User defined network
  3. ingress network
  4. None of the options

18)What happens to the current task when the availability of the Active node is modified as Drain Node?

  1. Task terminates abruptly
  2. Task is paused
  3. Task Fails
  4. Task continues to run

19)The number of tokens generated when the master node is initialized in Swarm mode is _ _ _ _

  1. 1
  2. 2
  3. 0

20)The Docker Swarm command to autolock swarm, when initialized is _ _ _ _

  1. docker swarm autolock
  2. docker swarm init – -autolock
  3. docker swarm init -lock
  4. None of the options

21)The Worker Node is responsible for container orchestration

  1. True
  2. False

22)In Docker Swarm, all communication between nodes happens through the Transport Layer Security

  1. False
  2. True

23)Global service runs one task per worker node

  1. False
  2. True

24)Swarm task is _ _ _ _

  1. Unidirectional
  2. Bidirectional

25)In Docker Swarm, you can define the task and container relationship as _ _ _ _

  1. one to one
  2. one to many
  3. No relation
  4. many to one

You may also like...