<p>From what I understand the Job object is supposed to reap pods after a certain amount of time.
But on my GKE cluster (Kubernetes 1.1.8) it seems that "kubectl get pods -a" can list pods from days ago. </p>

<p>All were created using the Jobs API.</p>

<p>I did notice that after delete the job with
    kubectl delete jobs
The pods were deleted too.</p>

<p>My main concern here is that I am going to run thousands and tens of thousands of pods on the cluster in batch jobs, and don't want to overload the internal backlog system.</p>

<p>It looks like starting with Kubernetes 1.6 (and the v2alpha1 api version), if you're using cronjobs to create the jobs (that, in turn, create your pods), you'll be able to <a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/" rel="noreferrer">limit</a> how many old jobs are kept.  Just add the following to your job spec:</p>

<pre><code>successfulJobsHistoryLimit: X
failedJobsHistoryLimit: Y
</code></pre>

<p>Where X and Y are the limits of how many previously run jobs the system should keep around (it keeps jobs around indefinitely by default [at least on version 1.5.])</p>

<p>Edit <strong>2018-09-29</strong>:</p>

<p>For newer K8S versions, updated links with documentation for this are here:</p>

<ul>
<li><p><a href="https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#jobs-history-limits" rel="noreferrer">CronJob - Job History Limits</a></p></li>
<li><p><a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#cronjob-v1beta1-batch" rel="noreferrer">CronJob API Spec</a></p></li>
</ul>
