Kubernetes Job Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 1: Line 1:
=External=
=External=
* https://kubernetes.io/docs/concepts/workloads/controllers/job/#writing-a-job-spec
* https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/job-v1/
* https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/job-v1/



Revision as of 21:14, 14 July 2023

External

Internal

Example

apiVersion: batch/v1
kind: Job
metadata:
  name: test-job
spec:
  completions: 1
  backoffLimit: 0
  template:
    spec:
      containers:
      - name: test-container
        image: docker.com/some-image:1.0.0
        command: ["some-command", "test"]
      restartPolicy: Never

.metadata Elements

.spec Elements

completions

backoffLimit

Specifies the number of retries before marking this job failed. Defaults to 6. Retries are counted in addition to the initial execution.