init container image change or container GC will not restart Pod since 1.20

Signed-off-by: pacoxu <paco.xu@daocloud.io>
This commit is contained in:
pacoxu
2021-03-17 11:34:40 +08:00
parent 885daa22bf
commit ed7c4e7046
@@ -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" %}}