Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← Application Design and Build practice sets

CKAD Application Design and Build • Complete Question Bank

CKAD Application Design and Build — All Questions With Answers

Complete CKAD Application Design and Build question bank — all 0 questions with answers and detailed explanations.

178
Questions
Free
No signup
Certifications/CKAD/Practice Test/Application Design and Build/All Questions
Question 1hardmultiple choice
Read the full Application Design and Build explanation →

A team is deploying a microservice that requires initialization of a database schema before the main application starts. The init container must run a script that writes to a shared volume. Which configuration correctly ensures the init container completes before the main container runs?

Question 2mediummultiple choice
Read the full Application Design and Build explanation →

A developer needs to expose a deployment named 'web-app' running on port 8080 to external traffic. The cluster is on-premises with no cloud load balancer. Which service type should be used?

Question 3easymultiple choice
Read the full Application Design and Build explanation →

A developer is creating a ConfigMap from a file named 'app.properties'. The file contains key-value pairs. Which command correctly creates the ConfigMap with keys matching the file content?

Question 4mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements are true about Kubernetes Secrets?

Question 5hardmulti select
Read the full Application Design and Build explanation →

Which THREE are valid reasons to use a StatefulSet instead of a Deployment?

Question 6easymultiple choice
Read the full Application Design and Build explanation →

A developer is designing a Job that should run exactly once and then stop. The Job runs a batch process that is expected to complete within one hour. Which restartPolicy and backoffLimit are appropriate?

Question 7mediummultiple choice
Read the full Application Design and Build explanation →

A developer creates a Deployment with 3 replicas that uses a ConfigMap mounted as a volume. After updating the ConfigMap, the developer expects the pods to pick up the new configuration immediately, but the old configuration is still in use. What is the most likely reason?

Question 8mediummultiple choice
Read the full Application Design and Build explanation →

You are tasked with deploying a stateless web application on a Kubernetes cluster. The application is containerized and listens on port 8080. You have created a Deployment named 'webapp' with 3 replicas, and a ClusterIP Service named 'webapp-svc' exposing port 80 targeting the application's port 8080. During testing, you notice that some requests to the service return errors while others succeed. You have verified that all Pods are running and ready. The application logs show no errors. What is the most likely cause of the intermittent failures?

Question 9mediumdrag order
Read the full Application Design and Build explanation →

Arrange the steps to create a Kubernetes Deployment with a rolling update strategy.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 10mediumdrag order
Read the full Application Design and Build explanation →

Sequence the steps to expose a Kubernetes Service using a NodePort for external access.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5
Question 11mediummatching
Read the full Application Design and Build explanation →

Match each Kubernetes resource to its primary purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Smallest deployable unit running containers

Stable network endpoint for a set of pods

Store non-sensitive configuration data

Request for storage resources

HTTP and HTTPS routing to services

Question 12mediummatching
Read the full Application Design and Build explanation →

Match each Kubernetes Service type to its behavior.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Exposes service on a cluster-internal IP

Exposes service on each node's IP at a static port

Exposes service externally using a cloud load balancer

Maps service to a DNS name

No cluster IP; used for stateful workloads

Question 13mediummultiple choice
Read the full Application Design and Build explanation →

A developer has a Dockerfile that builds a Go application. The final image size is 800MB. Which improvement would MOST reduce the image size?

Question 14easymultiple choice
Read the full Application Design and Build explanation →

What is the primary purpose of an Init Container in a Pod?

Question 15mediummultiple choice
Read the full Application Design and Build explanation →

A user runs: kubectl run my-pod --image=nginx --restart=Never --dry-run=client -o yaml. Which apiVersion is used in the generated YAML?

Question 16hardmultiple choice
Read the full Application Design and Build explanation →

A CronJob is configured with concurrencyPolicy: Replace and a job execution takes 10 minutes. The schedule is */5 * * * *. Which statement is true about job executions?

Question 17mediummultiple choice
Read the full Application Design and Build explanation →

A DevOps engineer wants to deploy a logging sidecar container that reads log files from the main application container. Which volume type should be used to share files between the two containers?

Question 18hardmultiple choice
Read the full Application Design and Build explanation →

A Pod has two containers: one with a liveness probe that fails after 30 seconds. The restartPolicy is 'Never'. What state will the Pod be in after the liveness probe fails?

Question 19easymultiple choice
Read the full Application Design and Build explanation →

Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?

Question 20mediummultiple choice
Read the full Application Design and Build explanation →

A developer wants to create a Job that runs exactly 3 pods in parallel. Which field should be set in the Job spec?

Question 21easymultiple choice
Read the full Application Design and Build explanation →

In a Dockerfile, what is the difference between CMD and ENTRYPOINT?

Question 22mediummultiple choice
Read the full Application Design and Build explanation →

A user runs: kubectl apply -f job.yaml. The Job spec has backoffLimit: 0. The pod fails immediately. What happens?

Question 23hardmultiple choice
Read the full Application Design and Build explanation →

An administrator creates a Pod with an ephemeral container using 'kubectl debug my-pod -it --image=busybox --target=my-container'. The ephemeral container shares the same process namespace as the target container. Which flag enables this?

Question 24easymultiple choice
Read the full Application Design and Build explanation →

Which Kubernetes API version is used for creating a CronJob?

Question 25mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements about Init Containers are correct? (Select exactly 2.)

Question 26hardmulti select
Read the full NAT/PAT explanation →

A team wants to deploy a multi-container Pod with a sidecar pattern. Which THREE statements are true about sidecar containers? (Select exactly 3.)

Question 27mediummulti select
Read the full Application Design and Build explanation →

A developer is creating a CronJob that should not start a new job if the previous one is still running. Which TWO configurations achieve this? (Select exactly 2.)

Question 28easymultiple choice
Read the full Application Design and Build explanation →

Which Dockerfile instruction is used to specify the base image for a container image?

Question 29mediummultiple choice
Study the full Python automation breakdown →

A developer is writing a Dockerfile and wants to ensure that the container runs a Python script named 'app.py' as its main process. Which instruction should be used?

Question 30mediummultiple choice
Read the full Application Design and Build explanation →

A Kubernetes pod has two containers: a main application container and a sidecar container running a logging agent. The sidecar container is expected to start before the main container because it needs to initialize a shared log directory. What Kubernetes feature ensures this ordering?

Question 31hardmultiple choice
Read the full Application Design and Build explanation →

You have a multi-stage Docker build. The first stage compiles a binary, and the second stage copies the binary from the first stage. What is the correct COPY syntax to copy a file named 'app' from the first stage named 'builder'?

Question 32easymultiple choice
Read the full Application Design and Build explanation →

What is the purpose of the '.dockerignore' file?

Question 33mediummultiple choice
Read the full Application Design and Build explanation →

A developer wants to tag a local image 'myapp:latest' with the tag 'v1.0.0' for pushing to a registry. Which kubectl command does this?

Question 34easymultiple choice
Read the full Application Design and Build explanation →

What is the correct apiVersion for a Kubernetes Job in v1.29?

Question 35mediummultiple choice
Read the full Application Design and Build explanation →

A user runs 'kubectl run nginx --image=nginx --restart=Never' and the pod goes into 'Pending' state. What is a likely reason?

Question 36hardmultiple choice
Read the full Application Design and Build explanation →

A CronJob is configured with 'concurrencyPolicy: Forbid'. If a job from the previous schedule is still running when the next scheduled time arrives, what happens?

Question 37mediummultiple choice
Read the full Application Design and Build explanation →

A user creates a Job with '.spec.completions=5' and '.spec.parallelism=2'. How many pods will run at the same time?

Question 38hardmultiple choice
Read the full Application Design and Build explanation →

You need to debug a pod that has no running container because it crashed. The pod is in CrashLoopBackOff. Which command allows you to start a temporary container in the same pod for debugging?

Question 39mediummultiple choice
Read the full Application Design and Build explanation →

What is the default restart policy for a pod created with 'kubectl run nginx --image=nginx'?

Question 40mediummulti select
Read the full NAT/PAT explanation →

Which TWO of the following are valid patterns for sidecar containers in a multi-container pod?

Question 41hardmulti select
Read the full Application Design and Build explanation →

Which THREE of the following are valid fields in the '.spec' of a Job manifest?

Question 42mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid concurrencyPolicy values for a CronJob?

Question 43mediummultiple choice
Read the full Application Design and Build explanation →

A developer wants to containerize a Node.js application. The Dockerfile should first copy only package.json and package-lock.json, run npm install, then copy the rest of the source code. Which Dockerfile best achieves this?

Question 44easymultiple choice
Read the full Application Design and Build explanation →

Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?

Question 45mediummultiple choice
Read the full Application Design and Build explanation →

You need to run a database migration as a container before the main application container starts. Which Kubernetes concept should you use?

Question 46hardmultiple choice
Read the full Application Design and Build explanation →

A pod has an init container that fails. The status shows 'Init:CrashLoopBackOff'. The pod's restartPolicy is 'Always'. What happens to the init container?

Question 47easymultiple choice
Read the full Application Design and Build explanation →

Which kubectl command creates a pod named 'nginx' from the image 'nginx:latest'?

Question 48mediummultiple choice
Read the full Application Design and Build explanation →

A Job must run 10 times in total, with up to 3 pods running simultaneously. Which fields should be set?

Question 49hardmultiple choice
Read the full Application Design and Build explanation →

A CronJob is configured with concurrencyPolicy: Forbid and schedule: '*/5 * * * *'. The first job takes 7 minutes. What happens when the next scheduled time arrives?

Question 50mediummultiple choice
Read the full Application Design and Build explanation →

You want to expose a container's port 8080 in the Dockerfile. Which instruction should you use?

Question 51easymultiple choice
Read the full Application Design and Build explanation →

Which instruction in a Dockerfile sets the default command to run when the container starts, but allows overriding?

Question 52hardmultiple choice
Read the full Application Design and Build explanation →

A multi-stage build has two stages named 'builder' and 'final'. Which instruction copies artifacts from the builder stage to the final stage?

Question 53mediummultiple choice
Read the full Application Design and Build explanation →

A pod named 'webapp' is stuck in 'Pending' state. 'kubectl describe pod webapp' shows '0/1 nodes are available: 1 Insufficient memory'. What is the most likely cause?

Question 54mediummultiple choice
Read the full Application Design and Build explanation →

Which command attaches an ephemeral container to a running pod for debugging?

Question 55mediummulti select
Read the full Application Design and Build explanation →

Which TWO practices optimize Docker image size? (Select 2)

Question 56hardmulti select
Read the full Application Design and Build explanation →

Which THREE statements are true about init containers? (Select 3)

Question 57mediummulti select
Read the full Application Design and Build explanation →

Which TWO fields are required in a CronJob manifest? (Select 2)

Question 58mediummultiple choice
Read the full Application Design and Build explanation →

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

Question 59easymultiple choice
Read the full Application Design and Build explanation →

Which of the following commands creates a Job that runs a single pod executing the command 'sleep 30'?

Question 60mediummultiple choice
Read the full Application Design and Build explanation →

You have a multi-stage Dockerfile for a Go application. The first stage compiles the binary, and the second stage uses a scratch image. Which of the following is the correct way to copy the binary from the first stage into the second stage?

Question 61hardmultiple choice
Read the full Application Design and Build explanation →

A Kubernetes Job with parallelism=3 and completions=6 is created. How many pods will run concurrently at most?

Question 62easymultiple choice
Read the full Application Design and Build explanation →

Which field in a CronJob spec specifies the maximum number of successful jobs that should be retained?

Question 63mediummultiple choice
Read the full NAT/PAT explanation →

You have a pod with two containers: one runs a web server, and the other is a sidecar that logs the web server's output to a central logging system. Which pattern does this represent?

Question 64hardmultiple choice
Read the full Application Design and Build explanation →

You need to debug a pod that has no shell installed. You want to add a temporary container with debugging tools to the pod. Which command should you use?

Question 65easymultiple choice
Read the full Application Design and Build explanation →

What is the purpose of an init container in a pod?

Question 66mediummultiple choice
Read the full Application Design and Build explanation →

A CronJob has concurrencyPolicy set to 'Forbid'. At the scheduled time, if the previous job is still running, what happens?

Question 67mediummultiple choice
Read the full Application Design and Build explanation →

Which of the following is the correct way to set a memory limit of 512Mi for a container in a pod spec?

Question 68hardmultiple choice
Read the full Application Design and Build explanation →

You have a multi-container pod with two containers: container-A and container-B. container-B needs to access the network of container-A. Which configuration is required?

Question 69easymultiple choice
Read the full Application Design and Build explanation →

Which of the following Dockerfile instructions is used to set a command that runs when the container starts and can be overridden by command-line arguments?

Question 70mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid fields in a Job spec? (Select TWO.)

Question 71hardmulti select
Read the full Application Design and Build explanation →

Which THREE of the following are correct about init containers? (Select THREE.)

Question 72mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid concurrencyPolicy values for a CronJob? (Select TWO.)

Question 73easymultiple choice
Read the full Application Design and Build explanation →

Which Dockerfile instruction is used to specify the base image for a build?

Question 74mediummultiple choice
Read the full Application Design and Build explanation →

You run the following command: 'kubectl run nginx --image=nginx --restart=Never'. What Kubernetes resource is created?

Question 75hardmultiple choice
Read the full Application Design and Build explanation →

You have a multi-stage Dockerfile with two stages: 'builder' and 'runtime'. You want to copy artifacts from the builder stage to the runtime stage. Which Dockerfile instruction achieves this?

Question 76mediummultiple choice
Read the full Application Design and Build explanation →

A pod has two containers: a web server and a sidecar that scrapes logs. The sidecar container needs to read log files written by the web server. How should the logs be shared between the containers?

Question 77mediummultiple choice
Read the full Application Design and Build explanation →

You need to run a one-time batch job that processes 10 work items in parallel, with a maximum of 3 pods running at the same time. Which Job YAML fields should you set?

Question 78hardmultiple choice
Read the full Application Design and Build explanation →

You have a CronJob that runs every 5 minutes. The job sometimes takes longer than 5 minutes to complete. You want to ensure that while a job is running, the next scheduled job is skipped (not started). Which concurrencyPolicy should you use?

Question 79easymultiple choice
Read the full Application Design and Build explanation →

Which of the following best describes the purpose of an init container?

Question 80mediummultiple choice
Read the full Application Design and Build explanation →

You want to create a Deployment that runs 5 replicas of a web application. Which kubectl command should you use?

Question 81hardmultiple choice
Read the full Application Design and Build explanation →

You have a Job that should retry up to 3 times if it fails, and should be considered failed after 4 failures total (including retries). Which YAML fields should you set?

Question 82mediummultiple choice
Read the full Application Design and Build explanation →

Which of the following is true about the CMD instruction in a Dockerfile?

Question 83mediummultiple choice
Read the full Application Design and Build explanation →

You want to debug a running pod by starting a temporary container that has network access to the pod's containers. Which kubectl command should you use?

Question 84easymultiple choice
Read the full Application Design and Build explanation →

Which Dockerfile instruction is used to define a mount point for a volume?

Question 85mediummulti select
Read the full NAT/PAT explanation →

Which TWO of the following are valid patterns for sidecar containers in Kubernetes?

Question 86hardmulti select
Read the full Application Design and Build explanation →

Which THREE of the following are valid fields in a CronJob specification?

Question 87mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are true about .dockerignore files?

Question 88mediummultiple choice
Read the full Application Design and Build explanation →

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

Question 89easymultiple choice
Read the full Application Design and Build explanation →

Which of the following is the correct way to create a simple Pod named 'nginx' running the nginx:1.25 image using kubectl?

Question 90hardmultiple choice
Read the full NAT/PAT explanation →

You have a Pod that runs a web server and you want to add a sidecar container that exposes a Prometheus metrics endpoint by scraping the web server's logs. Which sidecar pattern does this exemplify?

Question 91mediummultiple choice
Read the full Application Design and Build explanation →

A developer creates a Dockerfile with the following content: FROM alpine:3.18 COPY app.sh /app.sh RUN chmod +x /app.sh CMD ["/app.sh"] They want to override the command to run '/app.sh --debug' when deploying the container in Kubernetes. Which of the following pod spec fields should they use?

Question 92mediummultiple choice
Read the full Application Design and Build explanation →

You need to run a batch job that processes 100 items. The job should be considered complete when all items are processed successfully. You want to run up to 10 pods concurrently. Which job configuration is correct?

Question 93hardmultiple choice
Read the full Application Design and Build explanation →

You have a CronJob that runs every 5 minutes. The previous job is still running when the next scheduled time arrives. You want the new job to be skipped if the previous one is still running. Which concurrencyPolicy should you set?

Question 94easymultiple choice
Read the full Application Design and Build explanation →

Which of the following is NOT a valid restart policy for a Pod?

Question 95mediummultiple choice
Read the full Application Design and Build explanation →

You have a multi-stage Dockerfile. You want to copy artifacts from the builder stage to the final stage. Which instruction should you use in the final stage?

Question 96mediummultiple choice
Read the full Application Design and Build explanation →

You need to debug a running pod that does not have a shell installed. Which kubectl command allows you to start an ephemeral container with a shell?

Question 97hardmultiple choice
Read the full Application Design and Build explanation →

A Job has the following spec: apiVersion: batch/v1 kind: Job metadata: name: pi spec: template: spec: containers: - name: pi image: perl command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] restartPolicy: Never backoffLimit: 4 If the pod fails, how many times will Kubernetes retry the job before considering it failed?

Question 98easymultiple choice
Read the full Application Design and Build explanation →

Which file prevents certain files from being copied into a Docker image during a build?

Question 99mediummultiple choice
Read the full Application Design and Build explanation →

You have a Pod with two containers: a main application and a sidecar that handles logging. The sidecar needs access to the same log files as the main application. Which volume type allows both containers to share files?

Question 100hardmultiple choice
Read the full Application Design and Build explanation →

You run 'kubectl apply -f pod.yaml' but the pod remains in 'Pending' state. 'kubectl describe pod' shows '0/1 nodes are available: 1 Insufficient cpu'. What is the most likely cause?

Question 101mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements about init containers are correct?

Question 102mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid ways to expose a container port in a pod spec?

Question 103mediummultiple choice
Read the full Application Design and Build explanation →

You are tasked with containerizing a Go application. The application compiles into a binary. Which Dockerfile best implements a multi-stage build to produce a minimal image?

Question 104easymultiple choice
Read the full Application Design and Build explanation →

Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?

Question 105hardmultiple choice
Read the full Application Design and Build explanation →

A developer creates a pod with two containers: a main web server and a sidecar that rotates logs. The sidecar must start before the main container. Which field enforces this startup order?

Question 106mediummultiple choice
Read the full Application Design and Build explanation →

You run 'kubectl run nginx --image=nginx --restart=Never --dry-run=client -o yaml'. What is the output?

Question 107easymultiple choice
Read the full Application Design and Build explanation →

Which Dockerfile instruction sets a default command that can be overridden by arguments passed to 'docker run'?

Question 108mediummultiple choice
Read the full Application Design and Build explanation →

A Job must run exactly 3 Pods in parallel. Which Job manifest field achieves this?

Question 109hardmultiple choice
Read the full Application Design and Build explanation →

You need to debug a pod that is not responding. Which command attaches an ephemeral debug container to a running pod named 'web-pod'?

Question 110mediummultiple choice
Read the full Application Design and Build explanation →

A CronJob must run a task every day at midnight, but if the previous job is still running, the new job should be skipped. Which concurrencyPolicy should be set?

Question 111mediummultiple choice
Read the full Application Design and Build explanation →

What is the correct schedule expression for a CronJob that runs every 5 minutes?

Question 112easymultiple choice
Read the full Application Design and Build explanation →

Which 'kubectl' command creates a pod named 'test-pod' using the nginx image and outputs the YAML manifest without actually creating it?

Question 113hardmultiple choice
Read the full Application Design and Build explanation →

A Pod with an init container and a main container is created. The init container runs a script that takes 10 seconds. The main container's startupProbe has initialDelaySeconds: 5. When does the startupProbe begin?

Question 114mediummultiple choice
Read the full Application Design and Build explanation →

You have a Dockerfile with 'CMD ["nginx", "-g", "daemon off;"]'. A developer wants to run the container with a different command: 'nginx -t'. How should they run the container?

Question 115mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements about init containers are true? (Select 2)

Question 116hardmulti select
Read the full Application Design and Build explanation →

Which THREE options are valid fields in a CronJob spec? (Select 3)

Question 117easymulti select
Read the full Application Design and Build explanation →

Which TWO instructions are commonly used to add files to a Docker image during build? (Select 2)

Question 118mediummultiple choice
Read the full Application Design and Build explanation →

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

Question 119easymultiple choice
Read the full Application Design and Build explanation →

You need to create a Job that runs a single task to completion. Which kubectl command correctly creates a Job named 'data-processor' that runs the image 'myapp/processor:1.0'?

Question 120mediummultiple choice
Read the full Application Design and Build explanation →

You have a Dockerfile with a multi-stage build. The first stage is named 'builder' and uses 'golang:1.20' to compile a binary. The second stage uses 'alpine:3.18' and should copy the binary from the first stage. Which COPY instruction is correct?

Question 121hardmultiple choice
Read the full Application Design and Build explanation →

You are designing a Pod that must run a diagnostic tool to collect network logs before the main application starts. The diagnostic tool should run to completion, then the main application starts. Which approach should you use?

Question 122easymultiple choice
Read the full Application Design and Build explanation →

Which YAML snippet correctly defines a CronJob that runs a task every 5 minutes?

Question 123hardmultiple choice
Read the full Application Design and Build explanation →

You have a CronJob that runs a backup every hour. Due to a network issue, some backups take longer than an hour, causing overlapping executions. You want to ensure that if a new job is scheduled while the previous one is still running, the new job is skipped. Which concurrencyPolicy should you set?

Question 124mediummultiple choice
Read the full Application Design and Build explanation →

A developer wants to debug a running container in a Pod named 'web-app' in namespace 'dev'. Which command attaches an ephemeral container with the 'nicolaka/netshoot' image for network debugging?

Question 125easymultiple choice
Read the full Application Design and Build explanation →

What is the purpose of a .dockerignore file in a Docker build context?

Question 126hardmultiple choice
Read the full NAT/PAT explanation →

You are deploying a Pod that contains two containers: a web server and a file sync agent. The file sync agent needs to run as long as the web server is running and should share the same network namespace. Which design pattern does this represent?

Question 127mediummultiple choice
Read the full Application Design and Build explanation →

You need to run a batch job that processes 10 items in parallel across 10 Pods, but the job should be considered complete only when all 10 Pods have succeeded. Which Job configuration is correct?

Question 128mediummultiple choice
Read the full NAT/PAT explanation →

You are writing a Dockerfile and want to ensure that the CMD instruction is overridable when running the container, but the ENTRYPOINT should not be easily overridden. Which combination should you use?

Question 129mediummultiple choice
Read the full Application Design and Build explanation →

You have a Deployment with 3 replicas. You need to perform a rolling update with a 10-second delay between each Pod replacement to ensure stability. Which kubectl command is correct?

Question 130hardmulti select
Read the full Application Design and Build explanation →

Which TWO statements about init containers are true?

Question 131mediummulti select
Read the full Application Design and Build explanation →

Which TWO options are valid ways to tag an image when building with Docker?

Question 132hardmulti select
Read the full NAT/PAT explanation →

Which THREE are valid patterns for multi-container Pods?

Question 133easymultiple choice
Read the full Application Design and Build explanation →

Which Dockerfile instruction sets a command that can be overridden when running the container?

Question 134easymultiple choice
Read the full Application Design and Build explanation →

What is the primary purpose of an init container in a pod?

Question 135mediummultiple choice
Read the full NAT/PAT explanation →

A developer runs 'kubectl run mypod --image=nginx --restart=Never' and the pod is created. However, when the container exits, the pod terminates. Which restart policy ensures the pod does NOT restart after completion?

Question 136mediummultiple choice
Read the full Application Design and Build explanation →

You need to run a batch job that processes a queue and must ensure exactly 5 pods run successfully in parallel. Which Job configuration field should be set?

Question 137mediummultiple choice
Read the full Application Design and Build explanation →

A CronJob is configured with 'concurrencyPolicy: Forbid'. What happens if the scheduled time arrives while the previous job is still running?

Question 138hardmultiple choice
Read the full Application Design and Build explanation →

Consider the following partial Dockerfile: FROM alpine:3.18 AS builder RUN apk add --no-cache curl COPY src /app/src RUN make /app/bin

FROM alpine:3.18 COPY --from=builder /app/bin /app/bin CMD ["/app/bin"] What is the primary benefit of this multi-stage build?

Question 139hardmultiple choice
Read the full NAT/PAT explanation →

A pod named 'app' has a container that logs to stdout. You want to add a sidecar container that streams these logs to a centralized logging service. Which pattern does this represent?

Question 140easymultiple choice
Read the full Application Design and Build explanation →

Which kubectl command creates a deployment named 'web' from the image 'nginx:1.25' and exposes it on port 80?

Question 141mediummultiple choice
Read the full Application Design and Build explanation →

You have a YAML file for a Job named 'data-processor' with 'spec.backoffLimit: 4'. After 3 retries, one pod fails. How many more retries will Kubernetes attempt on that pod?

Question 142hardmultiple choice
Read the full Application Design and Build explanation →

A pod with an init container and a main container has 'restartPolicy: Always'. The init container exits with code 0. What happens next?

Question 143easymultiple choice
Read the full Application Design and Build explanation →

Which of the following is a valid schedule for a CronJob that runs every day at midnight?

Question 144mediummultiple choice
Read the full Application Design and Build explanation →

You run 'kubectl run debug-pod --image=busybox -it --restart=Never -- sh' but the pod starts and immediately exits. You want to keep the container running to execute commands later. What flag should you add?

Question 145mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements about the .dockerignore file are true?

Question 146mediummulti select
Read the full NAT/PAT explanation →

Which THREE of the following are valid patterns for multi-container pods?

Question 147hardmulti select
Read the full Application Design and Build explanation →

You are given a pod YAML that uses an init container to wait for a database. The init container exits with code 0, but the main container crashes. Which TWO fields in the pod spec directly affect the behavior of the main container after it crashes?

Question 148mediummultiple choice
Read the full Application Design and Build explanation →

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

Question 149easymultiple choice
Read the full Application Design and Build explanation →

Which of the following Dockerfile instructions sets the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions?

Question 150mediummultiple choice
Read the full Application Design and Build explanation →

You have a multi-stage Dockerfile. The first stage builds a binary using a large build image. The second stage copies the binary from the first stage into a minimal runtime image. Which Dockerfile instruction is used to copy artifacts from a previous stage?

Question 151hardmultiple choice
Read the full Application Design and Build explanation →

You are tasked with running a batch job that processes 100 items in parallel, using a Kubernetes Job. The Job should ensure that all items are processed even if some pods fail, and the total number of pod failures should be limited to 3. Which Job configuration is correct?

Question 152mediummultiple choice
Read the full Application Design and Build explanation →

You need to schedule a task that runs every day at 2:00 AM. The task should be allowed to run even if a previous instance is still running. Which concurrencyPolicy should you set in the CronJob spec?

Question 153easymultiple choice
Read the full Application Design and Build explanation →

Which of the following commands creates a deployment named 'webapp' that runs the image 'nginx:1.25' with 3 replicas and exposes port 80?

Question 154mediummultiple choice
Read the full Application Design and Build explanation →

You have a multi-container pod with a main container and a sidecar container that collects logs. The sidecar container should start before the main container and must complete initialization tasks before the main container starts. Which type of container should you use for this purpose?

Question 155hardmultiple choice
Read the full Application Design and Build explanation →

You have a pod that runs a single container with the following resource limits: memory: 256Mi, cpu: 500m. The container is consistently using 300Mi of memory and 300m of CPU. The pod is running but you want to avoid OOMKilled. Which change should you make?

Question 156easymultiple choice
Read the full Application Design and Build explanation →

Which of the following is the correct apiVersion for a Kubernetes Job in v1.29?

Question 157mediummultiple choice
Read the full Application Design and Build explanation →

You need to add a debugging container to a running pod named 'app-pod' in the 'dev' namespace. Which command achieves this?

Question 158hardmultiple choice
Read the full Application Design and Build explanation →

You have a Job that runs a batch process. The Job YAML is as follows:

apiVersion: batch/v1 kind: Job metadata: name: batch-job spec: parallelism: 4 completions: 12 backoffLimit: 2 template: spec: containers: - name: worker image: myapp:latest restartPolicy: Never

If one pod fails after 3 successful completions, and the Job has already completed 7 successes, how many pods will be running at that point? Assume no other failures.

Question 159easymultiple choice
Read the full Application Design and Build explanation →

In a Kubernetes pod definition, which field specifies the container image to use?

Question 160mediummulti select
Read the full Application Design and Build explanation →

Which TWO statements about init containers are true?

Question 161mediummulti select
Read the full Application Design and Build explanation →

Which TWO commands can be used to create a resource from a YAML file?

Question 162hardmulti select
Read the full Application Design and Build explanation →

Which THREE statements about Dockerfile CMD and ENTRYPOINT are correct?

Question 163mediummultiple choice
Read the full Application Design and Build explanation →

You are tasked with building a container image for a Node.js application. The Dockerfile must first install system dependencies, then copy application code, and finally run the app. Which of the following Dockerfiles is correct?

Question 164easymultiple choice
Read the full Application Design and Build explanation →

Which command is used to create a CronJob in Kubernetes that runs a job every 5 minutes?

Question 165hardmultiple choice
Read the full Application Design and Build explanation →

A developer wants to run a one-time batch job that processes exactly 10 items, with up to 3 pods running concurrently. The job should retry each pod up to 2 times if it fails. Which YAML snippet correctly configures the Job?

Question 166easymultiple choice
Read the full Application Design and Build explanation →

Which of the following is the correct apiVersion for a CronJob in Kubernetes v1.29?

Question 167mediummultiple choice
Read the full Application Design and Build explanation →

You have a multi-container pod with a main container and a sidecar container that collects logs. The sidecar container must start before the main container and must keep running. Which type of container is the sidecar?

Question 168mediummultiple choice
Read the full Application Design and Build explanation →

A pod is stuck in 'Pending' state. You run 'kubectl describe pod mypod' and see the event: '0/4 nodes are available: 4 Insufficient memory'. Which action will resolve the issue?

Question 169hardmultiple choice
Read the full Application Design and Build explanation →

You need to debug a pod that is running but not serving traffic. You want to add a temporary container with networking tools to the pod. Which command should you use?

Question 170easymultiple choice
Read the full Application Design and Build explanation →

An init container in a pod runs a database migration script. The init container fails and exits with a non-zero exit code. What will happen to the pod?

Question 171mediummultiple choice
Read the full Application Design and Build explanation →

You have a Dockerfile that uses a multi-stage build. Which of the following statements about multi-stage builds is correct?

Question 172hardmultiple choice
Read the full Application Design and Build explanation →

A CronJob is configured with concurrencyPolicy: Forbid. The scheduled job takes longer than the interval between schedules to complete. What happens when the next scheduled time arrives while the previous job is still running?

Question 173mediummultiple choice
Read the full Application Design and Build explanation →

You need to ensure that a Pod always runs on a node with an SSD. Which node selector mechanism should you use?

Question 174mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid uses of init containers? (Select 2)

Question 175hardmulti select
Read the full Application Design and Build explanation →

Which THREE of the following are correct about the .dockerignore file? (Select 3)

Question 176mediummulti select
Read the full Application Design and Build explanation →

Which TWO of the following are valid fields in a CronJob spec? (Select 2)

Question 177easymulti select
Read the full Application Design and Build explanation →

Which TWO of the following commands can be used to create a Pod in Kubernetes? (Select 2)

Question 178mediummultiple choice
Read the full Application Design and Build explanation →

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

Practice tests

Scored 10-question sessions with instant feedback and explanations.

CKAD Practice Test 1 — 10 Questions→CKAD Practice Test 2 — 10 Questions→CKAD Practice Test 3 — 10 Questions→CKAD Practice Test 4 — 10 Questions→CKAD Practice Test 5 — 10 Questions→CKAD Practice Exam 1 — 20 Questions→CKAD Practice Exam 2 — 20 Questions→CKAD Practice Exam 3 — 20 Questions→CKAD Practice Exam 4 — 20 Questions→Free CKAD Practice Test 1 — 30 Questions→Free CKAD Practice Test 2 — 30 Questions→Free CKAD Practice Test 3 — 30 Questions→CKAD Practice Questions 1 — 50 Questions→CKAD Practice Questions 2 — 50 Questions→CKAD Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

Application Design and BuildApplication DeploymentApplication Environment, Configuration and SecurityApplication Observability and MaintenanceServices and Networking

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All Application Design and Build setsAll Application Design and Build questionsCKAD Practice Hub