Courseiva
Kubernetes Fundamentals →mediumMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

A developer wants to run a batch job that processes a large dataset. The job should run to completion, and if the Pod fails, it should be retried up to 4 times before being marked as failed. Which Kubernetes resource and configuration should be used?

⚠ Common exam trap

Candidates often confuse the retry behavior of a Job with that of a Deployment; Deployments restart containers indefinitely and never complete, so they cannot satisfy a batch job requirement.

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 backoffLimit set to 4 and restartPolicy set to OnFailure

The requirement is a run-to-completion workload with limited retries. A Job is the correct resource, and backoffLimit specifies the number of retries before marking the Job as failed. Setting restartPolicy to OnFailure allows the container to restart within the Pod on failure, which is necessary for retries to occur. Deployments and bare Pods do not provide completion semantics, and CronJobs are for scheduled tasks, not immediate one-time jobs.

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 Deployment with replicas set to 5 and restartPolicy set to Always

    Why it's wrong here

    A Deployment is for long-running, stateless services, not batch jobs. It maintains a desired number of replicas and restarts containers indefinitely. It does not support run-to-completion semantics, and restartPolicy: Always means containers are always restarted, so the Pod never completes. This does not satisfy the requirement for a job that runs to completion with limited retries.

  • ✗

    A CronJob with schedule set to a future time and backoffLimit set to 4

    Why it's wrong here

    A CronJob is for scheduled, recurring tasks. It creates Jobs based on a cron schedule. While it can have a backoffLimit, it is not suitable for a one-time batch job that should run immediately. The schedule field would delay execution, and the recurring nature is unnecessary. This does not meet the requirement of a single run-to-completion job with retries.

  • ✗

    A Pod with restartPolicy set to Never and no controller

    Why it's wrong here

    A bare Pod with restartPolicy: Never will not be restarted on failure, so it will not retry. There is no controller to manage retries or track completion. This fails the requirement of retrying up to 4 times. Jobs are the correct resource for managing retries and completion status. A bare Pod is not suitable for batch processing with retry logic.

  • ✓

    A Job with backoffLimit set to 4 and restartPolicy set to OnFailure

    Why this is correct

    A Job is designed for run-to-completion workloads. Setting backoffLimit to 4 allows up to 4 retries after a failure, and restartPolicy: OnFailure ensures the container is restarted within the same Pod on failure. This combination meets the requirement of retrying up to 4 times. The Job controller will mark the Job as failed after the backoffLimit is exceeded.

About these practice questions

This KCNA question is part of Courseiva's 930-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 →

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.