Skip to content

Commit ef1b3bf

Browse files
committed
Clarify the condition when preStop hook is invoked
1 parent 589f101 commit ef1b3bf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/en/docs/concepts/workloads/pods/pod-lifecycle.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,11 @@ An example flow:
454454
as terminating (a graceful shutdown duration has been set), the kubelet begins the local Pod
455455
shutdown process.
456456
1. If one of the Pod's containers has defined a `preStop`
457-
[hook](/docs/concepts/containers/container-lifecycle-hooks), the kubelet
458-
runs that hook inside of the container. If the `preStop` hook is still running after the
459-
grace period expires, the kubelet requests a small, one-off grace period extension of 2
460-
seconds.
457+
[hook](/docs/concepts/containers/container-lifecycle-hooks) and the `terminationGracePeriodSeconds`
458+
in the Pod spec is not set to 0, the kubelet runs that hook inside of the container.
459+
The default `terminationGracePeriodSeconds` setting is 30 seconds.
460+
If the `preStop` hook is still running after the grace period expires, the kubelet requests
461+
a small, one-off grace period extension of 2 seconds.
461462
{{< note >}}
462463
If the `preStop` hook needs longer to complete than the default grace period allows,
463464
you must modify `terminationGracePeriodSeconds` to suit this.

0 commit comments

Comments
 (0)