Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ The goal is to help candidates:
* [Describe how a Dockerized application communicates with legacy systems.](data/1_Orchestration/legacy_communication.yaml)
* [Describe how to deploy containerized workloads as Kubernetes pods and deployments.](data/1_Orchestration/k8s_pods_deployments.yaml)
* [Describe how to provide configuration to Kubernetes pods using configMaps and secrets.](data/1_Orchestration/k8s_configmap_secret.yaml)
* [Describe service update and rollback strategies.](data/1_Orchestration/service_update_rollback.yaml)
* [Describe node availability (drain, active, pause).](data/1_Orchestration/node_availability.yaml)
* [Describe the Swarm autolock feature.](data/1_Orchestration/swarm_autolock.yaml)
* [Describe Docker secrets and configs in Swarm.](data/1_Orchestration/secrets_and_configs.yaml)
* [Describe service health checks in Swarm.](data/1_Orchestration/service_healthcheck.yaml)

### Domain 2: Image Creation, Management, and Registry (20% of exam)

Expand All @@ -61,6 +66,11 @@ The goal is to help candidates:
* [Push an image to a registry.](data/2_Image_creation_management_registry/push_an_image_to_a_registry.yaml)
* [Sign an image in a registry.](data/2_Image_creation_management_registry/sign_an_image_in_a_registry.yaml)
* [Pull and delete images from a registry.](data/2_Image_creation_management_registry/pull_delete_images_registry.yaml)
* [Describe the HEALTHCHECK instruction in a Dockerfile.](data/2_Image_creation_management_registry/healthcheck_instruction.yaml)
* [Describe BuildKit and docker buildx.](data/2_Image_creation_management_registry/buildkit_buildx.yaml)
* [Compare CMD vs ENTRYPOINT instructions.](data/2_Image_creation_management_registry/cmd_vs_entrypoint.yaml)
* [Compare ARG vs ENV instructions.](data/2_Image_creation_management_registry/arg_vs_env.yaml)
* [Describe Docker build cache optimization.](data/2_Image_creation_management_registry/build_cache.yaml)

### Domain 3: Installation and Configuration (15% of exam)

Expand Down
72 changes: 72 additions & 0 deletions data/1_Orchestration/node_availability.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
questions:
- uuid: 7427d279-6a03-499d-8db8-8b33f60ec85e
question: Which command sets a Swarm node to drain availability?
answers:
- { value: 'docker node update --availability drain <node>', correct: true }
- { value: 'docker node drain <node>', correct: false }
- { value: 'docker swarm update --drain <node>', correct: false }
- { value: 'docker node set --status drain <node>', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/node/update/'

- uuid: f4a6b9b3-8933-4c9c-9ea1-d8345989ea76
question: What happens to running tasks on a node when its availability is set to drain?
answers:
- { value: 'Tasks are paused until the node is set back to active', correct: false }
- { value: 'Tasks are stopped and rescheduled on other available nodes', correct: true }
- { value: 'Tasks continue running but no new tasks are assigned', correct: false }
- { value: 'Tasks are deleted permanently', correct: false }
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'

- uuid: 6d2a3fc6-f24e-4252-8e6b-1a7917f91a6e
question: What are the three possible availability states for a Docker Swarm node?
answers:
- { value: 'active, pause, drain', correct: true }
- { value: 'running, stopped, paused', correct: false }
- { value: 'active, inactive, drain', correct: false }
- { value: 'ready, standby, offline', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/node/update/'

- uuid: 70d6f4a7-8e5c-4b1d-a3f9-4c0e7d2b5a38
question: What is the effect of setting a node to "pause" availability?
answers:
- { value: 'All running tasks are stopped immediately', correct: false }
- { value: 'The node leaves the Swarm cluster', correct: false }
- { value: 'The node does not receive new tasks but existing tasks continue running', correct: true }
- { value: 'The node becomes a manager node', correct: false }
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'

- uuid: 81e7a5b8-9f6d-4c2e-b4a0-5d1f8e3c6b49
question: Can a manager node be drained in Docker Swarm?
answers:
- { value: 'No, manager nodes cannot be drained', correct: false }
- { value: 'Yes, but it loses its manager status', correct: false }
- { value: 'Yes, it stops running tasks but retains its manager role', correct: true }
- { value: 'Yes, but only if there is a single manager in the cluster', correct: false }
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'

- uuid: 71b27922-45ab-4e23-822e-692c78185b05
question: After draining a node and performing maintenance, which command makes the node available for tasks again?
answers:
- { value: 'docker node update --availability active <node>', correct: true }
- { value: 'docker node activate <node>', correct: false }
- { value: 'docker node update --status ready <node>', correct: false }
- { value: 'docker node resume <node>', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/node/update/'

- uuid: cde811d8-6da1-4771-8737-849ef4fab487
question: When a drained node is set back to active, do previously running tasks automatically move back to it?
answers:
- { value: 'Yes, all tasks return to their original node', correct: false }
- { value: 'Yes, but only global service tasks return', correct: false }
- { value: 'No, existing tasks stay where they are; the node only receives new or rebalanced tasks', correct: true }
- { value: 'No, the node must rejoin the Swarm to receive tasks', correct: false }
help: 'https://docs.docker.com/engine/swarm/swarm-tutorial/drain-node/'

- uuid: f19b3d4c-c3dd-433a-9f25-3ec41f55aba0
question: Which command can you use to verify the current availability status of all Swarm nodes?
answers:
- { value: 'docker swarm status', correct: false }
- { value: 'docker node ls', correct: true }
- { value: 'docker info --nodes', correct: false }
- { value: 'docker service ps --all', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/node/ls/'
72 changes: 72 additions & 0 deletions data/1_Orchestration/secrets_and_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
questions:
- uuid: f5adb06a-f283-4072-8330-e8a12a751a4e
question: Which command creates a Docker secret from a file?
answers:
- { value: 'docker secret add my_secret ./secret.txt', correct: false }
- { value: 'docker secret create my_secret ./secret.txt', correct: true }
- { value: 'docker service secret --add my_secret ./secret.txt', correct: false }
- { value: 'docker config create --secret my_secret ./secret.txt', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/secret/create/'

- uuid: d2d8f6a9-0e7b-4b3c-a5f1-6c2e9d4b7a50
question: Where are Docker secrets mounted inside a service container by default?
answers:
- { value: '/etc/secrets/<secret_name>', correct: false }
- { value: '/var/run/secrets/<secret_name>', correct: false }
- { value: '/run/secrets/<secret_name>', correct: true }
- { value: '/tmp/secrets/<secret_name>', correct: false }
help: 'https://docs.docker.com/engine/swarm/secrets/#how-docker-manages-secrets'

- uuid: e3e9a7b0-1f8c-4c4d-b6a2-7d3f0e5c8b61
question: Which command creates a Docker config from a file?
answers:
- { value: 'docker config create my_config ./config.txt', correct: true }
- { value: 'docker config add my_config ./config.txt', correct: false }
- { value: 'docker service config --add my_config ./config.txt', correct: false }
- { value: 'docker create config my_config ./config.txt', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/config/create/'

- uuid: 17a35533-1048-467a-bf3f-3cf2511e60a5
question: What is a key difference between Docker secrets and Docker configs?
answers:
- { value: 'Secrets are stored in Raft log encrypted; configs are not encrypted at rest', correct: true }
- { value: 'Configs can only be used with global services', correct: false }
- { value: 'Secrets are mounted as volumes; configs are set as environment variables', correct: false }
- { value: 'Configs are limited to 100KB; secrets have no size limit', correct: false }
help: 'https://docs.docker.com/engine/swarm/configs/'

- uuid: 62f66a6c-b332-4f77-ba3f-f0bc8417c8ab
question: How do you grant a running service access to an existing secret?
answers:
- { value: 'docker secret attach my_secret myservice', correct: false }
- { value: 'docker service update --secret-add my_secret myservice', correct: true }
- { value: 'docker service update --mount secret=my_secret myservice', correct: false }
- { value: 'docker secret grant my_secret myservice', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/update/'

- uuid: fe43e84a-19ae-40e3-83f1-8e0c89d627cc
question: Can you update or change the content of an existing Docker secret?
answers:
- { value: 'Yes, using docker secret update', correct: false }
- { value: 'Yes, by overwriting it with docker secret create --force', correct: false }
- { value: 'No, secrets are immutable; you must create a new secret and update the service', correct: true }
- { value: 'Yes, but only if no service is using it', correct: false }
help: 'https://docs.docker.com/engine/swarm/secrets/#example-rotate-a-secret'

- uuid: c59fa65c-9ee6-4989-95c0-4b4e45148d8a
question: Where are Docker configs mounted inside a container by default?
answers:
- { value: '/run/configs/<config_name>', correct: false }
- { value: '/<config_name>', correct: true }
- { value: '/etc/configs/<config_name>', correct: false }
- { value: '/var/config/<config_name>', correct: false }
help: 'https://docs.docker.com/engine/swarm/configs/#how-docker-manages-configs'

- uuid: d8d4f2a5-6e3b-4b9c-a1f7-2c8e5d0a3b16
question: Which Docker feature requires Swarm mode to function?
answers:
- { value: 'Volumes', correct: false }
- { value: 'Bridge networks', correct: false }
- { value: 'Secrets', correct: true }
- { value: 'Bind mounts', correct: false }
help: 'https://docs.docker.com/engine/swarm/secrets/'
54 changes: 54 additions & 0 deletions data/1_Orchestration/service_healthcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
questions:
- uuid: e9e5a3b6-7f4d-4c0e-b2a8-3d9f6e1b4c27
question: Which flag defines a health check command when creating a Docker Swarm service?
answers:
- { value: '--health-test', correct: false }
- { value: '--healthcheck', correct: false }
- { value: '--health-cmd', correct: true }
- { value: '--check-health', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-cmd'

- uuid: 44213b9c-edb1-490e-b6d7-8b83c6e61051
question: What are the three possible health states of a container with a health check configured?
answers:
- { value: 'healthy, unhealthy, unknown', correct: false }
- { value: 'starting, healthy, unhealthy', correct: true }
- { value: 'running, stopped, failed', correct: false }
- { value: 'passing, warning, critical', correct: false }
help: 'https://docs.docker.com/reference/dockerfile/#healthcheck'

- uuid: 780e95d2-b8f5-428e-9ed7-2b2cd01147d7
question: What does the --health-retries flag specify?
answers:
- { value: 'The number of times to retry a failed service deployment', correct: false }
- { value: 'The number of consecutive health check failures needed to report unhealthy', correct: true }
- { value: 'The number of health checks to run in parallel', correct: false }
- { value: 'The number of nodes to check health on', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-retries'

- uuid: 7ca92d5f-1075-4c7e-af6a-3ade80273bd3
question: What does the --health-start-period flag control?
answers:
- { value: 'The time to wait before the first health check runs', correct: false }
- { value: 'The grace period during which health check failures are not counted toward the maximum retries', correct: true }
- { value: 'The interval between health checks at service startup', correct: false }
- { value: 'The maximum time allowed for the service to start', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/create/#health-start-period'

- uuid: 96f70b46-c101-4d79-a032-d0fd10dc4297
question: What happens to a Swarm service task when its container is reported as unhealthy?
answers:
- { value: 'The task is paused and an alert is sent', correct: false }
- { value: 'Nothing happens; the task continues running', correct: false }
- { value: 'The task is stopped and a new task is scheduled to replace it', correct: true }
- { value: 'The task is moved to a different node', correct: false }
help: 'https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/'

- uuid: d4d0f8a1-2e9c-4b5d-a7f3-8c4e1d6a9b72
question: What is the default interval between health checks if --health-interval is not specified?
answers:
- { value: '10s', correct: false }
- { value: '30s', correct: true }
- { value: '1m', correct: false }
- { value: '5s', correct: false }
help: 'https://docs.docker.com/reference/dockerfile/#healthcheck'
90 changes: 90 additions & 0 deletions data/1_Orchestration/service_update_rollback.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
questions:
- uuid: a3c7e1b4-9f2d-4e8a-b5c6-1d3f7a9e2b04
question: Which command updates the image of an existing Docker Swarm service named "web" to nginx:1.25?
answers:
- { value: 'docker service update --image nginx:1.25 web', correct: true }
- { value: 'docker service create --image nginx:1.25 web', correct: false }
- { value: 'docker service scale --image nginx:1.25 web', correct: false }
- { value: 'docker update --image nginx:1.25 web', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/update/'

- uuid: b8d4f2a5-6e3c-4b9d-a1f7-2c8e5d0a3b16
question: What does the --update-delay flag control during a service update?
answers:
- { value: 'The time to wait before starting the update', correct: false }
- { value: 'The time to wait between updating each group of tasks', correct: true }
- { value: 'The maximum time a single task update can take', correct: false }
- { value: 'The time to wait before rolling back on failure', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: c9e5a3b6-7f4d-4c0e-b2a8-3d9f6e1b4c27
question: What does --update-parallelism 3 mean when updating a service?
answers:
- { value: 'Three services are updated at the same time', correct: false }
- { value: 'The update runs on three nodes simultaneously', correct: false }
- { value: 'Three tasks are updated at a time during the rolling update', correct: true }
- { value: 'The update retries three times on failure', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 39b5ce22-cbe0-465e-a39a-551f9775a62c
question: What is the default value for --update-failure-action in Docker Swarm?
answers:
- { value: 'rollback', correct: false }
- { value: 'continue', correct: false }
- { value: 'pause', correct: true }
- { value: 'stop', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 216987ff-de4a-44e0-a854-38d136f311e9
question: Which command manually triggers a rollback of a Docker Swarm service?
answers:
- { value: 'docker service revert myservice', correct: false }
- { value: 'docker service update --undo myservice', correct: false }
- { value: 'docker service rollback myservice', correct: true }
- { value: 'docker service update --previous myservice', correct: false }
help: 'https://docs.docker.com/reference/cli/docker/service/rollback/'

- uuid: 42faf48b-afa1-46cd-b294-27d1b86f26ae
question: What does the --update-order start-first option do during a service update?
answers:
- { value: 'It starts the new task before stopping the old task', correct: true }
- { value: 'It stops the old task before starting the new task', correct: false }
- { value: 'It starts the update on the first node in the cluster', correct: false }
- { value: 'It prioritizes manager nodes during the update', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 9c3cb4aa-daa3-4e0a-b80b-9ae8757d2ee6
question: What is the default update order for Docker Swarm service updates?
answers:
- { value: 'start-first', correct: false }
- { value: 'stop-first', correct: true }
- { value: 'parallel', correct: false }
- { value: 'round-robin', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 14d0f8a1-2e9c-4b5d-a7f3-8c4e1d6a9b72
question: Which flag sets the maximum time a single task has to update before it is considered failed?
answers:
- { value: '--update-delay', correct: false }
- { value: '--update-timeout', correct: false }
- { value: '--update-monitor', correct: true }
- { value: '--update-max-time', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 25e1a9b2-3f0d-4c6e-b8a4-9d5f2e7b0c83
question: How do you configure a service so that it automatically rolls back if an update fails?
answers:
- { value: '--update-failure-action rollback', correct: true }
- { value: '--rollback-on-failure true', correct: false }
- { value: '--update-auto-rollback', correct: false }
- { value: '--update-failure-action revert', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#configure-a-services-update-behavior'

- uuid: 372fc663-77c2-4bcf-aa95-cc365ffac6f0
question: Which flag configures the delay between task rollbacks during an automatic rollback?
answers:
- { value: '--update-delay', correct: false }
- { value: '--rollback-delay', correct: true }
- { value: '--rollback-interval', correct: false }
- { value: '--rollback-wait', correct: false }
help: 'https://docs.docker.com/engine/swarm/services/#roll-back-to-the-previous-version-of-a-service'
Loading