CKA Workloads & Scheduling Practice Question
A company runs a batch job that processes a queue. The job should run to completion exactly once. Which resource should be used?
⚠ Common exam trap
Candidates often confuse a CronJob with a Job, thinking that a CronJob can also run a one-time task, but CronJob is specifically for scheduled, recurring execution, not a single run-to-completion workload.
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
✓
Job
A Kubernetes Job is designed to run a specified number of pods to successful completion. When the pod exits with a zero exit code, the Job is marked as complete and will not be restarted, making it the correct choice for a batch job that must run exactly once.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Job
Why this is correct
A Kubernetes Job is specifically designed to run a finite batch workload to completion. It creates one or more Pods and ensures that a specified number of them successfully terminate, making it the ideal resource for processing a finite work queue. Once the tasks are complete, the Job stops creating Pods, conserving cluster resources.
- ✗
DaemonSet
Why it's wrong here
A DaemonSet ensures that all or some cluster nodes run a copy of a Pod, which is typically used for background system services like log collectors or monitoring agents. It does not manage finite batch tasks or run workloads to completion. Using a DaemonSet for a queue-processing batch job would inappropriately scale the workload based on cluster node count rather than queue size.
- ✗
CronJob
Why it's wrong here
A CronJob is used to run Jobs on a repeating, time-based schedule, similar to cron tasks in Linux. While it manages Jobs, it is designed for periodic execution rather than executing a one-off batch process triggered by queue availability. For a standard, non-scheduled queue processing task, a direct Job resource is the correct abstraction.
- ✗
Deployment
Why it's wrong here
Deployments are designed for stateless, long-running services like web applications that need to maintain a continuous state of availability. If a Pod in a Deployment exits successfully after processing a queue, the Deployment controller will interpret this as a drift and automatically restart it. This behavior creates an infinite loop of execution, which is unsuitable for finite batch processing.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
About these practice questions
This CKA question is part of Courseiva's 726-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKA 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 CKA exam.