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?
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.
Why this answer
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.
Exam trap
The trap here is that candidates 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.
How to eliminate wrong answers
Option A is wrong because editing a completed Job's template does not trigger a new run; the Job's pod template is immutable after creation, and changes require deletion and recreation. Option C is wrong because 'kubectl rollout restart' is a command for Deployments, DaemonSets, and StatefulSets, not for Jobs, which do not support rolling updates or restarts. Option D is wrong because 'kubectl rerun' is not a valid kubectl command; Kubernetes does not provide a built-in command to rerun a Job.