Update container-lifecycle-hooks.md
Co-authored-by: Ricardo Amaro <ricardoamaro@users.noreply.github.com> Co-authored-by: Ritika <52399571+Ritikaa96@users.noreply.github.com>
This commit is contained in:
parent
714e0533af
commit
16e3ad4bae
|
|
@ -64,11 +64,10 @@ When a Container lifecycle management hook is called,
|
||||||
the Kubernetes management system executes the handler according to the hook action,
|
the Kubernetes management system executes the handler according to the hook action,
|
||||||
`httpGet` , `tcpSocket` and `sleep` are executed by the kubelet process, and `exec` is executed in the container.
|
`httpGet` , `tcpSocket` and `sleep` are executed by the kubelet process, and `exec` is executed in the container.
|
||||||
|
|
||||||
Hook handler calls are synchronous within the context of the Pod containing the Container.
|
The `PostStart` hook handler call is initiated when a container is created,
|
||||||
This means that for a `PostStart` hook,
|
meaning the container ENTRYPOINT and the `PostStart` hook are triggered simultaneously.
|
||||||
the Container ENTRYPOINT and hook fire asynchronously.
|
However, if the `PostStart` hook takes too long to execute or if it hangs,
|
||||||
However, if the hook takes too long to run or hangs,
|
it can prevent the container from transitioning to a `running` state.
|
||||||
the Container cannot reach a `running` state.
|
|
||||||
|
|
||||||
`PreStop` hooks are not executed asynchronously from the signal to stop the Container; the hook must
|
`PreStop` hooks are not executed asynchronously from the signal to stop the Container; the hook must
|
||||||
complete its execution before the TERM signal can be sent. If a `PreStop` hook hangs during
|
complete its execution before the TERM signal can be sent. If a `PreStop` hook hangs during
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue