Courseiva
Kubernetes Fundamentals →mediumMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

A platform team wants to run a batch job that must complete successfully exactly once per day on a schedule. They need Kubernetes to create a Job object automatically at the specified times, and they want to keep a history of the last three successful and one failed Job for debugging. Which resource should they create?

⚠ Common exam trap

It's easy for candidates to confuse a Job, which runs a task once, with a CronJob, which creates Jobs on a schedule and manages their history.

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 CronJob with a schedule, successfulJobsHistoryLimit: 3, and failedJobsHistoryLimit: 1.

The requirement is a scheduled, one-off task with retention of past runs. A CronJob is the only resource that natively creates Jobs on a cron schedule and exposes history limits for successful and failed Jobs. The Job it creates handles completion and retries. Other workload controllers either run continuously or lack scheduling and history features, so they cannot fulfill the scenario.

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 cron schedule annotation and a restartPolicy of OnFailure.

    Why it's wrong here

    A Job does not have a native cron schedule field; scheduling is the responsibility of a CronJob. An annotation is not interpreted by the Job controller to create new Jobs on a timetable. While `restartPolicy: OnFailure` is valid for a Job's Pod template, it does not provide daily scheduling or history limits, so this cannot meet the stated requirement.

  • ✗

    A DaemonSet that runs a Pod on every node and executes the batch script once per day.

    Why it's wrong here

    A DaemonSet ensures a Pod runs on each node, typically for node-level agents. It does not provide cron scheduling or Job completion semantics, and it would run the script on every node rather than exactly once per day. History limits for successful and failed Jobs are not applicable to DaemonSets, making this unsuitable for a scheduled batch workload.

  • ✗

    A StatefulSet with an initContainer that sleeps until the next scheduled time.

    Why it's wrong here

    A StatefulSet manages long-running, stateful Pods with stable identities, not one-off batch tasks. Using an initContainer to sleep until a scheduled time is fragile, does not provide cron semantics, and does not create a new Job object for each run. It also lacks the requested history controls for successful and failed executions, so it does not satisfy the requirement.

  • ✓

    A CronJob with a schedule, successfulJobsHistoryLimit: 3, and failedJobsHistoryLimit: 1.

    Why this is correct

    A CronJob creates Job objects on a cron schedule. The fields `successfulJobsHistoryLimit` and `failedJobsHistoryLimit` control how many completed and failed Jobs are retained for inspection. Setting them to 3 and 1 matches the requirement to keep a short history while allowing the CronJob to create a new Job each day. The Job then runs the Pod to completion.

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 →

How Courseiva writes practice questions · Editorial policy

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 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.