title: Is there a 'max-retries' for Kubernetes Jobs?
body: <p>I have batch jobs that I want to run on Kubernetes. The way I understand Jobs:</p>
  
  <p>If I choose <code>restartPolicy: Never</code> it means that if the Job fails, it will destroy the Pod and reschedule onto (potentially) another node. If <code>restartPolicy: OnFailure</code>, it will restart the container in the existing Pod. I'd consider a certain number of failures unrecoverable. Is there a way I can prevent it from rescheduling or restarting after a certain period of time and cleanup the unrecoverable Jobs?</p>
  
  <p>My current thought for a workaround to this is to have some watchdog process that looks at retryTimes and cleans up Jobs after a specified number of retries.</p>