Merge pull request #27093 from pacoxu/init-container/behavior

init container image change or container GC will not restart Pod sinc…
This commit is contained in:
Kubernetes Prow Robot
2021-03-31 11:35:21 -07:00
committed by GitHub
@@ -313,16 +313,16 @@ limit, the same as the scheduler.
A Pod can restart, causing re-execution of init containers, for the following
reasons:
* A user updates the Pod specification, causing the init container image to change.
Any changes to the init container image restarts the Pod. App container image
changes only restart the app container.
* The Pod infrastructure container is restarted. This is uncommon and would
have to be done by someone with root access to nodes.
* All containers in a Pod are terminated while `restartPolicy` is set to Always,
forcing a restart, and the init container completion record has been lost due
to garbage collection.
The Pod will not be restarted when the init container image is changed, or the
init container completion record has been lost due to garbage collection. This
applies for Kubernetes v1.20 and later. If you are using an earlier version of
Kubernetes, consult the documentation for the version you are using.
## {{% heading "whatsnext" %}}