Kubernetes Job: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 7: | Line 7: | ||
=Overview= | =Overview= | ||
=Kubernetes Job Manifest= | |||
{{Internal|Kubernetes Job Manifest|Job Manifest}} | |||
=Clean up Finished Jobs Automatically= | =Clean up Finished Jobs Automatically= | ||
{{External|https://kubernetes.io/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically}} | {{External|https://kubernetes.io/docs/concepts/workloads/controllers/job/#clean-up-finished-jobs-automatically}} |
Revision as of 21:43, 2 May 2022
External
Internal
Overview
Kubernetes Job Manifest
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
...