Courseiva
Workloads and SchedulingeasyMultiple ChoiceObjective-mapped

CKA Workloads and Scheduling Practice Question

You want to run a batch job that processes a queue and then terminates. The job should be run only once. Which Kubernetes resource should you use?

⚠ Common exam trap

Test-takers frequently confuse a Job with a CronJob, thinking that any batch processing requires a schedule, but the key distinction is that a CronJob adds a time-based trigger, while a plain Job is for one-off execution.

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 completion, making it the correct choice for a batch process that runs once and then terminates. Unlike controllers that maintain a desired state (like Deployments or DaemonSets), a Job tracks pod completion and will not restart the pod once it succeeds, perfectly matching the requirement of a single execution.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • CronJob

    Why it's wrong here

    A CronJob is designed for scheduling recurring tasks based on a cron-like schedule, such as daily backups or hourly reports. While it *launches* Jobs, its primary purpose is to automate periodic execution, not to manage a single, immediate batch job that runs once and then terminates. For a one-off processing task, the overhead of defining a schedule is unnecessary and misrepresents the job's nature.

  • DaemonSet

    Why it's wrong here

    A DaemonSet ensures that a copy of a specific pod runs on every (or selected) node in the cluster. This is ideal for cluster-level services like logging agents, monitoring tools, or storage daemons that require continuous presence across nodes. It is entirely unsuitable for a batch job that needs to run to completion and then exit, as DaemonSet pods are inherently long-running and not designed to terminate.

  • Job

    Why this is correct

    A Kubernetes Job is the correct resource for running a task to completion. It manages the creation of one or more pods and ensures that a specified number of them successfully terminate. If a pod fails, the Job controller can restart it according to its `restartPolicy`, guaranteeing that the batch processing task finishes its work on the queue and then gracefully exits, without being restarted unnecessarily.

  • Deployment

    Why it's wrong here

    A Deployment is used to manage stateless applications, ensuring a specified number of replica pods are continuously running and available to serve requests. Its primary goal is high availability and rolling updates for long-running services, not to execute a finite task. If a batch job pod managed by a Deployment were to complete and exit, the Deployment controller would immediately attempt to restart it, leading to an infinite loop and wasted resources.

About these practice questions

Courseiva writes every CKA question from scratch — 302 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.