<p>I am running a kubernetes job on GKE and want to delete the job automatically after the job is completed.</p>

<p>Here is my configuration file for the job.
I set <code>ttlSecondsAfterFinished: 0</code> but the job was not deleted automatically.
Am I missing something?</p>

<ul>
<li>cluster / node version: 1.12.8-gke.10</li>
</ul>

<pre><code>apiVersion: batch/v1
kind: Job
metadata:
  name: myjob
spec:
  # automatically clean up finished job
  ttlSecondsAfterFinished: 0
  template:
    metadata:
      name: myjob
    spec:
      containers:
        - name: myjob
          image: gcr.io/GCP_PROJECT/myimage:COMMIT_SHA
          command: ["bash"]
          args: ["deploy.sh"]
      # Do not restart containers after they exit
      restartPolicy: Never
</code></pre>

Yohei Onishi
<p>Looks like this feature is still not available on GKE now.</p>

<p><a href="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/</a>
<a href="https://cloud.google.com/kubernetes-engine/docs/concepts/alpha-clusters#about_feature_stages" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/concepts/alpha-clusters#about_feature_stages</a></p>

<pre><code>To ensure stability and production quality, normal GKE clusters only enable features that
are beta or higher. Alpha features are not enabled on normal clusters because they are not
production-ready or upgradeable.
</code></pre>
