Kubernetes Job Manifest: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 7: Line 7:
=Overview=
=Overview=
=Example=
=Example=
<font size=-1>
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
</font>
=.spec Elements=
=.spec Elements=
==<tt>backoffLimit</tt>==
==<tt>backoffLimit</tt>==
Specifies the number of retries before marking this job failed. Defaults to 6. Retries are counted in addition to the initial execution.
Specifies the number of retries before marking this job failed. Defaults to 6. Retries are counted in addition to the initial execution.

Revision as of 00:16, 14 July 2023

External

Internal

Overview

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

.spec Elements

backoffLimit

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