Kubernetes Job: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:


=Internal=
=Internal=
* [[Kubernetes Higher Level Pod Controllers#Job|Higher Level Pod Controllers]]
* [[Kubernetes Workload Resources#Job|Kubernetes Workload Resources]]
* [[Kubernetes API Resources Concepts#Job|API Resources]]
* [[Kubernetes API Resources Concepts#Job|API Resources]]



Revision as of 23:39, 11 July 2023

External

Internal

Overview

Kubernetes Job Manifest

Job Manifest

Clean up Finished Jobs Automatically

https://kubernetes.io/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically

Jobs that have finished, either "Complete" or "Failed" can be automatically be deleted by using the TTL mechanism provided by the [TTL Controller ]. Set the .spec.ttlSecondsAfterFinished field in the job manifest. If the field is set to 0, the Job will be eligible to be automatically deleted immediately after it finishes.

apiVersion: batch/v1
kind: Job
spec:
  ttlSecondsAfterFinished: 100
  ...