You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -98,7 +115,8 @@ There are three types of hook handlers that can be implemented for Containers:
98
115
Resources consumed by the command are counted against the Container.
99
116
* HTTP - Executes an HTTP request against a specific endpoint on the Container.
100
117
* Sleep - Pauses the container for a specified duration.
101
-
This is a beta-level feature default enabled by the `PodLifecycleSleepAction` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
118
+
This is a beta-level feature default enabled by the `PodLifecycleSleepAction`
@@ -110,18 +128,18 @@ Resources consumed by the command are counted against the Container.
110
128
111
129
{{< note >}}
112
130
<!--
113
-
Enable the `PodLifecycleSleepActionAllowZero` feature gate if you want to set a sleep duration of zero seconds (effectively a no-op) for your Sleep lifecycle hooks.
131
+
The beta level `PodLifecycleSleepActionAllowZero` feature gate which is enabled by default from v1.33.
132
+
It allows you to set a sleep duration of zero seconds (effectively a no-op) for your Sleep lifecycle hooks.
and `sleep` are executed by the kubelet process, and `exec` is executed in the container.
126
144
-->
127
145
### 回调处理程序执行 {#hook-handler-execution}
@@ -211,16 +229,19 @@ The logs for a Hook handler are not exposed in Pod events.
211
229
If a handler fails for some reason, it broadcasts an event.
212
230
For `PostStart`, this is the `FailedPostStartHook` event,
213
231
and for `PreStop`, this is the `FailedPreStopHook` event.
214
-
To generate a failed `FailedPostStartHook` event yourself, modify the [lifecycle-events.yaml](https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/lifecycle-events.yaml) file to change the postStart command to "badcommand" and apply it.
215
-
Here is some example output of the resulting events you see from running `kubectl describe pod lifecycle-demo`:
232
+
To generate a failed `FailedPostStartHook` event yourself, modify the
0 commit comments