<p>I'm trying to troubleshoot an issue I'm having in kubernetes where after a job fails, the associated pod seemingly disappears and I can't view the logs. The job still exists though.</p>
<p>But that's not what my question is about. In reading through the documentation, it seemingly uses the terms &quot;terminated&quot; and &quot;deleted&quot; interchangably. This is leading me to be very confused. I would <em>assume</em> that terminated pods are not necessarily deleted, but the way the documentation is written, it implies that a terminated pod and a deleted pod are the same thing.</p>
<p><strong>Example 1:</strong> <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-termination-and-cleanup" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/job/#job-termination-and-cleanup</a></p>
<blockquote>
<p>When a Job completes, no more Pods are created, but the Pods are usually not deleted either</p>
</blockquote>
<p>&quot;usually&quot; then links to <a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/job/#pod-backoff-failure-policy</a> which then describes the logic by which pods will be <em>terminated</em>. So here, a link to a section which purports to describe the logic by which pods will be <em>deleted</em>, instead describes the logic by which pods will be <em>terminated</em>, implying they are one and the same.</p>
<p><strong>Example 2:</strong> <a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced</a></p>
<p>This section is titled &quot;Forced Pod <em>termination</em>&quot; and proceeds to explain what happens when you attempt to force <em>delete</em> a pod. Again implying that terminating and deleting a pod are one-and-the-same.</p>
<p><strong>Example 3:</strong>
<a href="https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination</a></p>
<p>This section, titled &quot;Termination of Pods&quot;, describes what happens when the user requests deletion of a pod.</p>
<p>The job in question is failing due to <code>DeadlineExceeded.</code> The documentation states &quot;Once a Job reaches <code>activeDeadlineSeconds</code>, all of its running Pods are terminated and the Job status will become type: Failed with reason: <code>DeadlineExceeded</code>.&quot; If <em>terminated</em> and <em>deleted</em> mean the same thing, then that would explain why my pods are gone. I find that a strange design choice but it at least would explain my problem.</p>
<p>The kubernetes documentation asked me if the documentation was helpful, I said &quot;no&quot; and it told me to create a question on stack overflow, so that's what I'm doing :)</p>

<p>As @karthikeayan said, Delete and Terminate are the same. And yes, your pods got deleted because activeDeadlineSeconds exceeded.</p>
<p>if your job have some error but you restartPolicy is not Never, so your job created pods will be deleted</p>
<p>restartPolicy can be set: This indicates that kubernetes will restart until the Job is completed successfully on OnFailure. However, the number of failures does not rise with each retry. To prevent a loop from failing, you can set activeDeadlineSeconds to a value.</p>
<p>As you have researched and gathered pretty good information it is good enough, To find the logs of a deleted pod follow this <a href="https://stackoverflow.com/questions/68572218/how-to-review-logs-of-a-deleted-pod">stack link</a> or else the best way is to have your logs centralized via logging agents or directly pushing these logs into an external service as suggested by @Jonas</p>
