← All notes

Init containers run to completion, in order, before a Pod's app containers start

Answer: Init containers are specialized containers that run before app containers in a Pod. Add them under the initContainers field of the Pod specification. Each one must complete successfully before the next one starts.

Rules

Init containers support resource limits, volumes and security settings, but their resource requests and limits are handled differently from app containers.

Typical use

Init containers can contain utilities or setup scripts not present in an app image. In the docs example, the init container and the application container share a Volume in the Pod. The init container mounts it at /work-dir, writes index.html with wget, and then terminates. The nginx app container mounts the same Volume at /usr/share/nginx/html and serves the file.

Init versus sidecar

A sidecar container starts before the main application container and continues to run. An init container runs to completion during Pod initialization.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Kubernetes docs, Init Containers; kubernetes/website (GitHub), Configure Pod Initialization (source page). 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, Init Containers; kubernetes/website (GitHub), Configure Pod Initialization (source page). CC-BY-4.0 (https://raw.githubusercontent.com/kubernetes/website/main/LICENSE). Copyright The Kubernetes Authors.

Cite this

Permanent ID: iil:note:wmsxb3c8

iinventedlight. 2026. "Init containers run to completion, in order, before a Pod's app containers start." iinventedlight Library, iil:note:wmsxb3c8, version of 2026-11-18. https://iinventedlight.com/library/notes/kubernetes-init-containers/. License: CC-BY-4.0.

@misc{iil_note_wmsxb3c8,
  author = {{iinventedlight}},
  title = {{Init containers run to completion, in order, before a Pod's app containers start}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-18},
  url = {https://iinventedlight.com/library/notes/kubernetes-init-containers/},
  note = {Permanent ID iil:note:wmsxb3c8. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/kubernetes-init-containers.md.