Skip to content

Latest commit

 

History

History
204 lines (144 loc) · 6.79 KB

1. Orchestration Questions.md

File metadata and controls

204 lines (144 loc) · 6.79 KB

Domain 1: Orchestration

  1. How would we back up the metadata for Docker Swarm?

(A) We canrun the swarm image with the backup command. (B) We can back up the contents of /usr/local/swarm. (C) While the Docker daemon stops, we can back up the contents of /var/lib/docker/swarm on a Swarm manager. (D) We can back up the contents of /etc/docker/swarm.

  1. Which of the following scenarios would still allow the quorum to have maintenance in a swarm cluster? (Choose two)

(A) A 3-node cluster with 2 nodes down. (B) A 4-node cluster with 2 nodes down. (C) A 7-node cluster with 3 nodes down. (D) A 3-node cluster with 1 node down.

  1. What command would we use to list the services that are part of a stack called web-store ?

(A) docker service 1s web-store (B) docker stack ps web-store (C) docker stack services web-store (D) docker service ls

  1. What command should we use if we want to view logs for all of the tasks in a service called my- service ? (A) docker task logs my-service (B) docker logs my-service (C) docker service logs my-service (D) docker container logs my-service

  2. Which of the following commands can we use to view detailed metadata about a container? (Choose two)

(A) docker metadata (B) docker container inspect (C) docker query (D) docker inspect

  1. Which of the following commands would successfully change the number of replicas to 5 in a service called my-service ? (Choose two)

(A) docker service -—-replicas 5 my-service (B) docker service update --replicas 5 my-service (C) docker service scale my-service=5 (D) docker task create —-service my-service --replicas 5

  1. What tool should we use if we need to manage a multi-container application as a unit on a single Docker host?

(A) We should use Docker Swarm. (B) We should execute docker-run . (C) We should use a Docker stack. (D) We should use Docker Compose.

  1. What command will help us delete a service called my-service along with all of its tasks?

(A) docker service rm -f my-service (B) docker service rm —-all my-service (C) docker service rm my-service --cascade (D) docker service rm my-service

  1. Eric has an application that consists of multiple different containers that interact with one another. What should he use to manage this application in a Docker Swarm?

(A) Eric should use a task. (B) Eric should use docker-compose. (C) Eric should use a stack. (D) Eric should use a service with multiple tasks.

  1. How would we rotate a docker swarm unlock-key and ensure that all nodes receive the new key? (A) We would run the docker swarm unlock-key —-rotate command on one manager node. (B) We would generate a new key and save it in a file located at /etc/docker/swarm /unlock.key . (C) We would run the docker swarm unlock-key —-rotate command on all manager nodes. (D) We can use the docker swarm unlock command.

11: What is the docker command to roll back to the previous version of a service?

A docker service --rollback B docker service update --rollback-version C docker service update --rollback D docker service --rollback-version

12: What is the docker command to add or update a published port? A docker service modify --add-update-port B docker service update --publish-port C docker service set --add-port D docker service update --publish-add

13: What is the docker command to add or update a node label? A docker node update --label-add B docker node modify --set-label C docker node update --set-label D docker node add --label

14: What is the docker command to add or update a placement constraint? A docker service update --placement-constraint-add B docker service update --constraint-add C docker service update --pref-add D docker service update --placement-pref-add

15: Which of the following is NOT true about Raft (docker consensus algorithm)? A Raft tolerates up to (N-2)/2 failures B If a quorum is not reached, the existing tasks will keep running C If a quorum is not reached, the system will not process any more requests to schedule additional tasks D Raft requires a majority or quorum of (N/2) + 1 members

16: What is the docker command to add or update a mount on a service? A docker service set --add-update-mount B docker service --mount-volume C docker service update --mount-add D docker service --add-update-mount

17: What is the docker command to add a placement preference? A docker service update --constraint-add B docker service update --placement-pref-add C docker service update --pref-add D docker service update --placement-constraint-add

18: What is the docker command to increase number of replicas? A docker service replica B docker service build C docker service increase D docker service scale

19: What is the docker command to add a network to a service? A docker service update --network-add B docker service modify --add-network C docker service set --add-network D docker service add-network

20: What is the docker command to update an existing service? A docker service update B docker service modify C docker service change D docker service config

21: What are the two types of docker swarm services? A distributed and replicated services B local and global services C replicated and local services D replicated and global services

22: What is the function of docker inspect command? A To display system-wide information B To return low-level information on Docker objects C To inspect changes to files or directories on a container's filesystem D To manage Docker configs

23: What is the difference between a replicated and a global service? A Number of identical tasks can be specified for a replicated service. There is no pre-specified number of tasks for global service. B Good candidates for replicated service are monitoring agents that you want to run on every node in the swarm. Good candidates for global service are http servers. C Replicated service runs one task on every node. Global service runs multiple task on every node. D Replicated service can only be deployed on manager node. Global service can be deployed on both manager and worker node.

24: What is the default format of docker inspect output? A html B xml C json D yaml

25: Which of the following is the docker command to enable autolock on an existing swarm cluster? A docker swarm update --autolock=true B docker swarm --autolock=true C docker swarm autolock D docker swarm update --autolock-swarm=true

  1. You have been asked to backup the swarm state on a Linux installation. By default, where do Docker manager nodes store the swarm state and manager logs? A. /var/run/docker/swarm B. /var/lib/docker/swarm C. /etc/docker/swarm D. /run/docker/swarm

  2. How do you deploy 4 new instances of nginx with a single command? A. docker service create --replicas 4 --name myservice nginx B. docker service create --instances 4 --name myservice nginx C. docker service scale myservice=4 nginx D. docker service scale --replicas 4 --name myservice nginx