Skip to content

Commit c8f36eb

Browse files
authored
Merge pull request #37277 from gaogao101/work01
[zh] Update container-lifecycle-hooks.md
2 parents 775d787 + 0a917ae commit c8f36eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/zh-cn/docs/concepts/containers/container-lifecycle-hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,15 @@ The logs for a Hook handler are not exposed in Pod events.
197197
If a handler fails for some reason, it broadcasts an event.
198198
For `PostStart`, this is the `FailedPostStartHook` event,
199199
and for `PreStop`, this is the `FailedPreStopHook` event.
200-
To generate a failed `FailedPreStopHook` 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.
200+
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.
201201
Here is some example output of the resulting events you see from running `kubectl describe pod lifecycle-demo`:
202202
-->
203203
### 调试回调处理程序
204204

205205
回调处理程序的日志不会在 Pod 事件中公开。
206206
如果处理程序由于某种原因失败,它将播放一个事件。
207207
对于 `PostStart`,这是 `FailedPostStartHook` 事件,对于 `PreStop`,这是 `FailedPreStopHook` 事件。
208-
要自己生成失败的 `FailedPreStopHook` 事件,请修改
208+
要自己生成失败的 `FailedPostStartHook` 事件,请修改
209209
[lifecycle-events.yaml](https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/lifecycle-events.yaml)
210210
文件将 postStart 命令更改为 “badcommand” 并应用它。
211211
以下是通过运行 `kubectl describe pod lifecycle-demo` 后你看到的一些结果事件的示例输出:

0 commit comments

Comments
 (0)