RestartPolicy Pods

Besfort:
when we create a job… in which situation we need to set restartPolicy: Never and when restartPolciy: OnFailure

raghu:
@Besfort @KK @Rahul Soni I also have the same query. Could you please make us understand the difference?

Rahul Soni:
If your job has restartPolicy = "OnFailure", keep in mind that container running the Job will be terminated once the job backoff limit has been reached. This can make debugging the Job’s executable more difficult. We suggest setting restartPolicy = "Never" when debugging the Job or using a logging system to ensure output from failed Jobs is not lost inadvertently.