KCNA CronJob Practice Question
You need to run a batch job that processes data every hour and exits upon completion. Which Kubernetes resource should you use?
⚠ Common exam trap
A common pitfall is focusing on the phrase 'exits upon completion' and choosing Job, forgetting that the question specifies a recurring schedule (every hour). CronJob is the scheduler that creates Jobs at specified times; without it, the Job would only run once.
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
✓
CronJob
The correct choice is CronJob. While a Job is designed to run a finite task to completion, the requirement to run 'every hour' indicates a recurring schedule. A CronJob creates Jobs on a specified schedule, so it is the appropriate resource to use. The Job itself will run and exit, but the CronJob manages the schedule.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deployment
Why it's wrong here
A Deployment maintains a desired count of long-running pods and restarts them indefinitely, so the process never terminates after finishing. It is tempting because it is the default workload for stateless applications, and it is the right choice when a service must stay available continuously rather than run to completion.
- ✗
Job
Why it's wrong here
A Job is designed for run-to-completion workloads, but it does not itself provide hourly scheduling; a CronJob is required to trigger it every hour. It is tempting because it correctly handles pods that exit on completion, and it would be the right choice for a one-off batch task without a recurring schedule.
- ✗
DaemonSet
Why it's wrong here
A DaemonSet runs one pod on every eligible node continuously, so it never exits on completion and cannot schedule hourly batch runs. It is tempting because it guarantees a pod per node, which is correct for cluster-wide agents such as log collectors, monitoring exporters or node-level networking components.
- ✓
CronJob
Why this is correct
A CronJob creates Jobs on a repeating schedule, so it runs the batch workload hourly and each Job's pod exits once processing completes. It satisfies both constraints: the hourly recurrence and the requirement that the process terminate rather than run continuously like a Deployment.
Go deeper
Related to this question
About these practice questions
One of 930 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This KCNA 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 KCNA exam.