Practice CKAD Application Design and Build questions with full explanations on every answer.
Start practicing
Application Design and Build — choose a session length
Free · No account required
Click any question to see the full explanation and answer options, or start a focused practice session above.
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?
2A 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?
3A 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?
4Which TWO statements are true about Kubernetes Secrets?
5Which THREE are valid reasons to use a StatefulSet instead of a Deployment?
6A 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?
7A 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?
8You 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?
9Arrange the steps to create a Kubernetes Deployment with a rolling update strategy.
10Sequence the steps to expose a Kubernetes Service using a NodePort for external access.
11Match each Kubernetes resource to its primary purpose.
12Match each Kubernetes Service type to its behavior.
13A developer has a Dockerfile that builds a Go application. The final image size is 800MB. Which improvement would MOST reduce the image size?
14What is the primary purpose of an Init Container in a Pod?
15A user runs: kubectl run my-pod --image=nginx --restart=Never --dry-run=client -o yaml. Which apiVersion is used in the generated YAML?
16A CronJob is configured with concurrencyPolicy: Replace and a job execution takes 10 minutes. The schedule is */5 * * * *. Which statement is true about job executions?
17A 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?
18A 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?
19Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?
20A developer wants to create a Job that runs exactly 3 pods in parallel. Which field should be set in the Job spec?
21In a Dockerfile, what is the difference between CMD and ENTRYPOINT?
22A user runs: kubectl apply -f job.yaml. The Job spec has backoffLimit: 0. The pod fails immediately. What happens?
23An 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?
24Which Kubernetes API version is used for creating a CronJob?
25Which TWO statements about Init Containers are correct? (Select exactly 2.)
26A team wants to deploy a multi-container Pod with a sidecar pattern. Which THREE statements are true about sidecar containers? (Select exactly 3.)
27A 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.)
28Which Dockerfile instruction is used to specify the base image for a container image?
29A 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?
30A 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?
31You 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'?
32What is the purpose of the '.dockerignore' file?
33A 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?
34What is the correct apiVersion for a Kubernetes Job in v1.29?
35A user runs 'kubectl run nginx --image=nginx --restart=Never' and the pod goes into 'Pending' state. What is a likely reason?
36A CronJob is configured with 'concurrencyPolicy: Forbid'. If a job from the previous schedule is still running when the next scheduled time arrives, what happens?
37A user creates a Job with '.spec.completions=5' and '.spec.parallelism=2'. How many pods will run at the same time?
38You 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?
39What is the default restart policy for a pod created with 'kubectl run nginx --image=nginx'?
40Which TWO of the following are valid patterns for sidecar containers in a multi-container pod?
41Which THREE of the following are valid fields in the '.spec' of a Job manifest?
42Which TWO of the following are valid concurrencyPolicy values for a CronJob?
43A 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?
44Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?
45You need to run a database migration as a container before the main application container starts. Which Kubernetes concept should you use?
46A pod has an init container that fails. The status shows 'Init:CrashLoopBackOff'. The pod's restartPolicy is 'Always'. What happens to the init container?
47Which kubectl command creates a pod named 'nginx' from the image 'nginx:latest'?
48A Job must run 10 times in total, with up to 3 pods running simultaneously. Which fields should be set?
49A CronJob is configured with concurrencyPolicy: Forbid and schedule: '*/5 * * * *'. The first job takes 7 minutes. What happens when the next scheduled time arrives?
50You want to expose a container's port 8080 in the Dockerfile. Which instruction should you use?
51Which instruction in a Dockerfile sets the default command to run when the container starts, but allows overriding?
52A multi-stage build has two stages named 'builder' and 'final'. Which instruction copies artifacts from the builder stage to the final stage?
53A 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?
54Which command attaches an ephemeral container to a running pod for debugging?
55Which TWO practices optimize Docker image size? (Select 2)
56Which THREE statements are true about init containers? (Select 3)
57Which TWO fields are required in a CronJob manifest? (Select 2)
58A 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?
59Which of the following commands creates a Job that runs a single pod executing the command 'sleep 30'?
60You 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?
61A Kubernetes Job with parallelism=3 and completions=6 is created. How many pods will run concurrently at most?
62Which field in a CronJob spec specifies the maximum number of successful jobs that should be retained?
63You 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?
64You 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?
65What is the purpose of an init container in a pod?
66A CronJob has concurrencyPolicy set to 'Forbid'. At the scheduled time, if the previous job is still running, what happens?
67Which of the following is the correct way to set a memory limit of 512Mi for a container in a pod spec?
68You 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?
69Which 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?
70Which TWO of the following are valid fields in a Job spec? (Select TWO.)
71Which THREE of the following are correct about init containers? (Select THREE.)
72Which TWO of the following are valid concurrencyPolicy values for a CronJob? (Select TWO.)
73Which Dockerfile instruction is used to specify the base image for a build?
74You run the following command: 'kubectl run nginx --image=nginx --restart=Never'. What Kubernetes resource is created?
75You 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?
76A 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?
77You 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?
78You 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?
79Which of the following best describes the purpose of an init container?
80You want to create a Deployment that runs 5 replicas of a web application. Which kubectl command should you use?
81You 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?
82Which of the following is true about the CMD instruction in a Dockerfile?
83You 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?
84Which Dockerfile instruction is used to define a mount point for a volume?
85Which TWO of the following are valid patterns for sidecar containers in Kubernetes?
86Which THREE of the following are valid fields in a CronJob specification?
87Which TWO of the following are true about .dockerignore files?
88A 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?
89Which of the following is the correct way to create a simple Pod named 'nginx' running the nginx:1.25 image using kubectl?
90You 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?
91A 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?
92You 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?
93You 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?
94Which of the following is NOT a valid restart policy for a Pod?
95You 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?
96You 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?
97A 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?
98Which file prevents certain files from being copied into a Docker image during a build?
99You 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?
100You 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?
101Which TWO statements about init containers are correct?
102Which TWO of the following are valid ways to expose a container port in a pod spec?
103You 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?
104Which command builds a Docker image from the current directory and tags it as 'myapp:v1'?
105A 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?
106You run 'kubectl run nginx --image=nginx --restart=Never --dry-run=client -o yaml'. What is the output?
107Which Dockerfile instruction sets a default command that can be overridden by arguments passed to 'docker run'?
108A Job must run exactly 3 Pods in parallel. Which Job manifest field achieves this?
109You need to debug a pod that is not responding. Which command attaches an ephemeral debug container to a running pod named 'web-pod'?
110A 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?
111What is the correct schedule expression for a CronJob that runs every 5 minutes?
112Which 'kubectl' command creates a pod named 'test-pod' using the nginx image and outputs the YAML manifest without actually creating it?
113A 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?
114You 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?
115Which TWO statements about init containers are true? (Select 2)
116Which THREE options are valid fields in a CronJob spec? (Select 3)
117Which TWO instructions are commonly used to add files to a Docker image during build? (Select 2)
118A 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?
119You 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'?
120You 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?
121You 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?
122Which YAML snippet correctly defines a CronJob that runs a task every 5 minutes?
123You 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?
124A 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?
125What is the purpose of a .dockerignore file in a Docker build context?
126You 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?
127You 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?
128You 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?
129You 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?
130Which TWO statements about init containers are true?
131Which TWO options are valid ways to tag an image when building with Docker?
132Which THREE are valid patterns for multi-container Pods?
133Which Dockerfile instruction sets a command that can be overridden when running the container?
134What is the primary purpose of an init container in a pod?
135A 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?
136You 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?
137A CronJob is configured with 'concurrencyPolicy: Forbid'. What happens if the scheduled time arrives while the previous job is still running?
138Consider 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?
139A 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?
140Which kubectl command creates a deployment named 'web' from the image 'nginx:1.25' and exposes it on port 80?
141You 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?
142A pod with an init container and a main container has 'restartPolicy: Always'. The init container exits with code 0. What happens next?
143Which of the following is a valid schedule for a CronJob that runs every day at midnight?
144You 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?
145Which TWO statements about the .dockerignore file are true?
146Which THREE of the following are valid patterns for multi-container pods?
147You 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?
148A 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?
149Which of the following Dockerfile instructions sets the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions?
150You 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?
151You 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?
152You 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?
153Which of the following commands creates a deployment named 'webapp' that runs the image 'nginx:1.25' with 3 replicas and exposes port 80?
154You 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?
155You 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?
156Which of the following is the correct apiVersion for a Kubernetes Job in v1.29?
157You need to add a debugging container to a running pod named 'app-pod' in the 'dev' namespace. Which command achieves this?
158You 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.
159In a Kubernetes pod definition, which field specifies the container image to use?
160Which TWO statements about init containers are true?
161Which TWO commands can be used to create a resource from a YAML file?
162Which THREE statements about Dockerfile CMD and ENTRYPOINT are correct?
163You 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?
164Which command is used to create a CronJob in Kubernetes that runs a job every 5 minutes?
165A 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?
166Which of the following is the correct apiVersion for a CronJob in Kubernetes v1.29?
167You 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?
168A 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?
169You 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?
170An 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?
171You have a Dockerfile that uses a multi-stage build. Which of the following statements about multi-stage builds is correct?
172A 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?
173You need to ensure that a Pod always runs on a node with an SSD. Which node selector mechanism should you use?
174Which TWO of the following are valid uses of init containers? (Select 2)
175Which THREE of the following are correct about the .dockerignore file? (Select 3)
176Which TWO of the following are valid fields in a CronJob spec? (Select 2)
177Which TWO of the following commands can be used to create a Pod in Kubernetes? (Select 2)
178A 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?
The Application Design and Build domain covers the key concepts tested in this area of the CKAD exam blueprint published by CNCF. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all CKAD domains — no account required.
The Courseiva CKAD question bank contains 178 questions in the Application Design and Build domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Application Design and Build domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included