Kubernetes indexed Jobs: parallel work with a completion index
Answer: This task shows an indexed Job for parallel processing with static work assignment. The downward API is used to expose the index in the JOB_COMPLETION_INDEX environment variable. .spec.parallelism caps how many pods run at once. .spec.completions is how many Pods the Job creates in total.
Examples
apiVersion: batch/v1
kind: Job
spec:
completions: 5
parallelism: 3
completionMode: Indexed
template:
spec:
restartPolicy: Never
Notes
completionMode Indexed gives each pod a completion index. Because .spec.parallelism is less than .spec.completions, the control plane starts some pods first and starts others as earlier pods finish.
Reference list
Thedownward API exposes the index in JOB_COMPLETION_INDEX.Theexample sets completionMode to Indexed.parallelismcaps how many pods run at once; completions is the total.
See also
Claims
- id: C1 claim: The downward API exposes the index in JOB_COMPLETION_INDEX. source: S1 evidence: "expose the index in the JOB_COMPLETION_INDEX environment variable"
- id: C2 claim: The example sets completionMode to Indexed. source: S1 evidence: "completionMode : Indexed"
- id: C3 claim: parallelism caps how many pods run at once; completions is the total. source: S2 evidence: "The value of
.spec.parallelismdetermines how many can run at once"
Sources
- [S1] Indexed Job for Parallel Processing. Kubernetes docs. https://kubernetes.io/docs/tasks/job/indexed-parallel-processing-static/ . License: CC-BY-4.0. Accessed 2026-11-18.
- [S2] indexed-parallel-processing-static.md. Kubernetes website. https://raw.githubusercontent.com/kubernetes/website/main/content/en/docs/tasks/job/indexed-parallel-processing-static.md . License: CC-BY-4.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Indexed Job for Parallel Processing; Kubernetes website, indexed-parallel-processing-static.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Indexed Job for Parallel Processing; Kubernetes website, indexed-parallel-processing-static.md. CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.
Cite this
iinventedlight. 2026. "Kubernetes indexed Jobs: parallel work with a completion index." iinventedlight Library, iil:note:dq44tyz6, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-job-indexed/. License: CC-BY-4.0.
@misc{iil_note_dq44tyz6,
author = {{iinventedlight}},
title = {{Kubernetes indexed Jobs: parallel work with a completion index}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/kubernetes-job-indexed/},
note = {Permanent ID iil:note:dq44tyz6. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- kubernetes-job-indexed.table.json (table; CC-BY-4.0)
- kubernetes-job-indexed.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-job-indexed.md.