<p>In Kubernetes job, there is a spec for .spec.activeDeadlineSeconds. If you don't explicitly set it, what will be the default value? 600 secs?</p>
<p>here is the example from k8s doc</p>
<pre><code>apiVersion: batch/v1
kind: Job
metadata:
  name: pi-with-timeout
spec:
  backoffLimit: 5
  activeDeadlineSeconds: 100
  template:
    spec:
      containers:
      - name: pi
        image: perl
        command: [&quot;perl&quot;,  &quot;-Mbignum=bpi&quot;, &quot;-wle&quot;, &quot;print bpi(2000)&quot;]
      restartPolicy: Never
</code></pre>
<p>assume I remove the line</p>
<pre><code>activeDeadlineSeconds: 100
</code></pre>

<p>By default, a Job will run uninterrupted.
If you don't set <code>activeDeadlineSeconds</code>, the job will not have active deadline limit. It means <code>activeDeadlineSeconds</code> doesn't have default value.</p>
<p>By the way, there are several ways to terminate the job.(Of course, when a Job completes, no more Pods are created.)</p>
<ul>
<li><p>Pod backoff failure policy(<code>.spec,.backofflimit</code>)
You can set <code>.spec.backoffLimit</code> to specify the number of retries before considering a Job as failed. The back-off limit is set by default to 6. Failed Pods associated with the Job are recreated by the Job controller with an exponential back-off delay (10s, 20s, 40s ...) capped at six minutes. The back-off count is reset when a Job's Pod is deleted or successful without any other Pods for the Job failing around that time.</p>
</li>
<li><p>Setting an active deadline(<code>.spec.activeDeadlineSeconds</code>)
The activeDeadlineSeconds applies to the duration of the job, no matter how many Pods are created. Once a Job reaches activeDeadlineSeconds, all of its running Pods are terminated and the Job status will become type: Failed with reason: DeadlineExceeded.</p>
</li>
</ul>
<p>Note that a Job's .spec.activeDeadlineSeconds takes precedence over its .spec.backoffLimit. Therefore, a Job that is retrying one or more failed Pods will not deploy additional Pods once it reaches the time limit specified by activeDeadlineSeconds, even if the backoffLimit is not yet reached.</p>
