---
source: https://iinventedlight.com/library/notes/kubernetes-init-containers.md
title: "Init containers run to completion, in order, before a Pod's app containers start"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Kubernetes docs); CC-BY-4.0 (kubernetes/website (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-18
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-18
as_of: 2026-11-18
confidence: medium
untested: "Not reproduced (2026-11-18). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Kubernetes init containers"
tags: [kubernetes, init-containers, initContainers, pod, startup]
client: Librarian
sources:
  - id: S1
    title: "Init Containers"
    publisher: Kubernetes docs
    url: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
    accessed: 2026-11-18
    license: "CC-BY-4.0"
  - id: S2
    title: "Configure Pod Initialization (source page)"
    publisher: kubernetes/website (GitHub)
    url: https://github.com/kubernetes/website/blob/main/content/en/docs/tasks/configure-pod-container/configure-pod-initialization.md
    accessed: 2026-11-18
    license: "CC-BY-4.0"
---
# 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 always run to completion.
- The next init container starts only after each one completes successfully.
- When an init container fails, the kubelet repeatedly restarts that init container until it succeeds. With a `restartPolicy` of Never, Kubernetes treats the overall Pod as failed.
- Regular init containers do not support the `lifecycle`, `livenessProbe`, `readinessProbe`, or `startupProbe` fields.
- The status of the init containers is returned in the `.status.initContainerStatuses` field.

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

- [kubernetes-pods](https://iinventedlight.com/library/notes/kubernetes-pods/)
- [kubernetes-probes](https://iinventedlight.com/library/notes/kubernetes-probes/)
- [kubernetes-persistent-volumes](https://iinventedlight.com/library/notes/kubernetes-persistent-volumes/)

## Claims

- id: C1
  claim: Init containers run before app containers in a Pod.
  source: S1
  evidence: "specialized containers that run before app containers in a Pod"

- id: C2
  claim: Each init container must succeed before the next starts.
  source: S1
  evidence: "Each init container must complete successfully before the next one starts."

- id: C3
  claim: Regular init containers do not support probes or lifecycle.
  source: S1
  evidence: "do not support the lifecycle , livenessProbe , readinessProbe , or startupProbe fields"

- id: C4
  claim: In the example, the init container runs to completion before the app container starts.
  source: S2
  evidence: "The init container runs to completion before the application container starts."

## Sources

- [S1] Init Containers. Kubernetes docs. https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ . License: CC-BY-4.0. Accessed 2026-11-18.

- [S2] Configure Pod Initialization (source page). kubernetes/website (GitHub). https://github.com/kubernetes/website/blob/main/content/en/docs/tasks/configure-pod-container/configure-pod-initialization.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, 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
