Merge pull request #37277 from gaogao101/work01
[zh] Update container-lifecycle-hooks.mdpull/37315/head
commit
c8f36ebfad
|
@ -197,7 +197,7 @@ The logs for a Hook handler are not exposed in Pod events.
|
|||
If a handler fails for some reason, it broadcasts an event.
|
||||
For `PostStart`, this is the `FailedPostStartHook` event,
|
||||
and for `PreStop`, this is the `FailedPreStopHook` event.
|
||||
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.
|
||||
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.
|
||||
Here is some example output of the resulting events you see from running `kubectl describe pod lifecycle-demo`:
|
||||
-->
|
||||
### 调试回调处理程序
|
||||
|
@ -205,7 +205,7 @@ Here is some example output of the resulting events you see from running `kubect
|
|||
回调处理程序的日志不会在 Pod 事件中公开。
|
||||
如果处理程序由于某种原因失败,它将播放一个事件。
|
||||
对于 `PostStart`,这是 `FailedPostStartHook` 事件,对于 `PreStop`,这是 `FailedPreStopHook` 事件。
|
||||
要自己生成失败的 `FailedPreStopHook` 事件,请修改
|
||||
要自己生成失败的 `FailedPostStartHook` 事件,请修改
|
||||
[lifecycle-events.yaml](https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/lifecycle-events.yaml)
|
||||
文件将 postStart 命令更改为 “badcommand” 并应用它。
|
||||
以下是通过运行 `kubectl describe pod lifecycle-demo` 后你看到的一些结果事件的示例输出:
|
||||
|
|
Loading…
Reference in New Issue