Skip to content

Commit 27779ce

Browse files
committed
38271 - Init Container concept clarity
1 parent 0e5ef2d commit 27779ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

content/en/docs/concepts/workloads/pods/init-containers.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,16 @@ If the Pod [restarts](#pod-restart-reasons), or is restarted, all init container
292292
must execute again.
293293

294294
Changes to the init container spec are limited to the container image field.
295-
Altering an init container image field is equivalent to restarting the Pod.
295+
Directly altering the `image` field of an init container does _not_ restart the
296+
Pod or trigger its recreation. If the Pod has yet to start, that change may
297+
have an effect on how the Pod boots up.
298+
299+
For a [pod template](/docs/concepts/workloads/pods/#pod-templates)
300+
you can typically change any field for an init container; the impact of making
301+
that change depends on where the pod template is used.
296302

297303
Because init containers can be restarted, retried, or re-executed, init container
298-
code should be idempotent. In particular, code that writes to files on `EmptyDirs`
304+
code should be idempotent. In particular, code that writes into any `emptyDir` volume
299305
should be prepared for the possibility that an output file already exists.
300306

301307
Init containers have all of the fields of an app container. However, Kubernetes

0 commit comments

Comments
 (0)