As explained in the Kuberenetes docs on the topic of jobs:
The
activeDeadlineSeconds
applies to the duration of the job, no matter how many Pods are created. Once a Job reachesactiveDeadlineSeconds
, all of its running Pods are terminated and the Job status will becometype: Failed
withreason: DeadlineExceeded
.
However, what I want to do is limit the time of each pod. If a pod takes too long, I want it to fail, but I want the other pods to continue, and for the job to create more pods if necessary.
I'll explain a bit about my task, just to make the problem crystal clear. The job consists of taking items from a Redis database, where the database serves as a sort of queue. Each pod processes one item (well, the number might vary). If a pod takes too long processing an item, I want it to fail. However, the other pods should continue, and the job should continue creating pods and retrieving more items from the database.