Courseiva
Workloads and Scheduling →mediumMultiple Choice

CKA Workloads and Scheduling Practice Question

A Job named 'data-processor' completes successfully. You want to run it again with the same configuration. What is the correct way to rerun the Job?

⚠ Common exam trap

It's easy for candidates to confuse Jobs with Deployments or other controllers that support rolling updates and restarts, leading them to incorrectly apply commands like 'kubectl rollout restart' or assume editing the template will trigger a new run.

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

✓

Delete the Job with 'kubectl delete job data-processor' and then recreate it.

A completed Job in Kubernetes is immutable and cannot be rerun by editing or restarting it. The only way to execute the same Job again is to delete the existing Job and recreate it with the same configuration, as Jobs are designed to run to completion and are not intended to be restarted like Deployments.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Edit the Job with 'kubectl edit job data-processor' and change the template.

    Why it's wrong here

    The pod template inside a Job spec is immutable after creation. Running `kubectl edit job data-processor` to change the template will cause the API server to reject the update with a validation error, so the Job will not be modified. You cannot alter the controller's template through an in-place edit; a Job must be recreated to apply a new pod template.

  • ✓

    Delete the Job with 'kubectl delete job data-processor' and then recreate it.

    Why this is correct

    A Job is immutable with respect to its pod template, so issuing `kubectl delete job data-processor` removes both the Job object and any completed Pods, and then `kubectl create job` (or `kubectl apply -f job.yaml`) creates a new Job resource that will schedule fresh Pods and run the template again. Without deletion, the old Job object's status and spec prevent an in-place rerun; a completed Job will never recreate its finished Pods.

  • ✗

    Run 'kubectl rollout restart job data-processor'

    Why it's wrong here

    `kubectl rollout restart` is only valid for controllers that manage rolling updates: Deployments, DaemonSets, and StatefulSets. A Job is a run-to-completion workload, not a serving workload; it has no rolling update strategy and no deployment revision annotation, so the command fails with an error indicating that the resource type does not support rollout restart. Restarting a Job would also be meaningless because the correct way to run the pod template again is to create a new Job.

  • ✗

    Run 'kubectl rerun job data-processor'

    Why it's wrong here

    There is no `rerun` subcommand in `kubectl`; running `kubectl rerun job data-processor` returns an error like `unknown command "rerun" for "kubectl"`. The idiomatic way to rerun a Job is to delete it and recreate it, or for scheduled workloads use a CronJob which creates a new Job on each schedule. This option is invalid simply because the command does not exist.

About these practice questions

One of 726 original CKA 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 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.