I have a Job that I'd like to retry a few times in Kubernetes. A Job can have a backoffLimit
and a activeDeadlineSeconds
set. Cool so far.
However, the latter setting takes precedence over the first, unfortunately. My Job blocks for a long time until it fails, so I'd like to have a way to retry the task in a new pod with each retry having a deadline.
E.g. try five times with a deadline of 30 seconds for each attempt.
Is that possible in Kubernetes?
You cannot do that in K8s, you will have to implement a logic into the script or image that you are using inside the
pod
.As we can read in the documentation Job Termination and Cleanup which was mentioned by You.