CKAD Application Design and Build Practice Question
A developer needs to run a one-off task that processes a queue and then exits. The task must run exactly once per invocation, and if the Pod fails, Kubernetes should restart it until it succeeds. The task should not be restarted after it completes successfully. Which Kubernetes resource should the developer create?
⚠ Common exam trap
The trap here is choosing a Deployment or bare Pod for a task that should stop after success, when only a Job provides run-to-completion semantics with failure retries.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A Job with a restartPolicy of OnFailure and no completions or parallelism settings.
A Job is the correct resource for run-to-completion tasks. Setting restartPolicy to OnFailure restarts the Pod only on failure, and the default single completion with no parallelism ensures the task runs once and stops after success, matching the requirement.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
A Job with a restartPolicy of OnFailure and no completions or parallelism settings.
Why this is correct
A Job is designed for run-to-completion workloads. With restartPolicy OnFailure, the Pod is restarted only if the container exits with a non-zero code, and no restart occurs after a successful exit. Default completions and parallelism of one ensure the task runs a single time.
- ✗
A bare Pod with a restartPolicy of OnFailure and no controller managing it.
Why it's wrong here
A bare Pod with OnFailure restarts the container on failure, but if the node fails or the Pod is evicted, it is not recreated. Without a Job controller, there is no guarantee the task eventually succeeds, and no tracking of successful completion.
- ✗
A CronJob with a schedule that runs every minute and a restartPolicy of Never.
Why it's wrong here
A CronJob is for scheduled, recurring execution, not a single one-off invocation. Scheduling every minute would repeatedly start the task, and restartPolicy Never would not restart a failed Pod, so it does not meet the exactly-once, retry-on-failure requirement.
- ✗
A Deployment with a single replica and a restartPolicy of Always.
Why it's wrong here
A Deployment manages long-running, always-on Pods. Its Pods cannot use a restartPolicy other than Always, so a container that exits successfully would be restarted, which conflicts with the requirement that the task not restart after success.
Go deeper
Related to this question
About these practice questions
This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CNCF exam blueprint
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.