Courseiva

KCNA Cloud Native Application Delivery Practice Question

A developer needs to run a one-off database migration job in a Kubernetes cluster and ensure it completes successfully before a new application version is rolled out. Which Kubernetes resource should be used for the migration task?

⚠ Common exam trap

The trap here is choosing a controller that keeps Pods running, when the migration needs a finite task that reports completion.

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 a restartPolicy of OnFailure and a backoffLimit.

A Job is the Kubernetes controller for finite, run-to-completion work. With OnFailure restarts and a backoffLimit, it retries transient errors and eventually reports success or failure, giving the rollout a reliable gate before the new application version starts.

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 restartPolicy of OnFailure and a backoffLimit.

    Why this is correct

    A Job runs Pods to completion and is designed for finite tasks like migrations. Setting restartPolicy to OnFailure lets the container retry on failure, and backoffLimit caps retries before the Job is marked failed. Completion status can gate the application rollout, ensuring the migration succeeds before new code starts.

  • ✗

    A Deployment with a single replica and no Service.

    Why it's wrong here

    A Deployment manages long-running Pods and restarts them indefinitely, so it never reports completion. There is no built-in success signal to gate the rollout, and the migration would run again after any restart. For a finite task with a clear end state, a Job is the correct controller.

  • ✗

    A CronJob with a schedule of every minute.

    Why it's wrong here

    A CronJob creates Jobs on a schedule, so a per-minute schedule would repeatedly run the migration and likely conflict with itself. It is intended for recurring tasks, not a single gated step. Using it here adds scheduling complexity and does not provide a clean one-time completion signal.

  • ✗

    A DaemonSet scheduled on every node.

    Why it's wrong here

    A DaemonSet ensures one Pod per node for node-level agents, which is unrelated to running a single migration. It would execute the migration once per node, causing duplicate and conflicting database changes. DaemonSets also lack a completion concept, so they cannot signal that the migration finished.

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.