<p>I'm running a job with a large number of completions, so hundreds of pods are created and eventually move into <code>COMPLETED</code> status.</p>
<p>Is there a way to expire the pods as they complete so I don't end up with a massively long list of completed pods?</p>
<p>We can do this for jobs using:</p>
<pre><code>spec:
  ttlSecondsAfterFinished: 300
  successfulJobsHistoryLimit: 1
</code></pre>
<p>But I haven't seen a way to do that for the pods created by the job.</p>

<p>No, they're left behind on purpose and you have to clean them up manually. We have a custom cleaner job which removes them after 7 days.</p>
<blockquote>
<p>When a Job completes, no more Pods are created, but the Pods are not
deleted either. Keeping them around allows you to still view the logs
of completed pods to check for errors, warnings, or other diagnostic
output. The job object also remains after it is completed so that you
can view its status. It is up to the user to delete old jobs after
noting their status.</p>
</blockquote>
<p><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>
