minor improvement

pull/31684/head
xinlingchao 2022-02-11 10:52:22 +08:00
parent 84593e9606
commit a1ec586976
1 changed files with 4 additions and 2 deletions

View File

@ -222,8 +222,10 @@ Here is some example output of the resulting events you see from running `kubect
回调处理程序的日志不会在 Pod 事件中公开。
如果处理程序由于某种原因失败,它将播放一个事件。
对于 `PostStart`,这是 `FailedPostStartHook` 事件,对于 `PreStop`,这是 `FailedPreStopHook` 事件。
要自己生成失败的 `FailedPreStopHook` 事件,请修改 [lifecycle-events.yaml](https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/lifecycle-events.yaml) 文件将 postStart 命令更改为 ”badcommand“ 并应用它。
下面是运行 `kubectl describe pod lifecycle-demo` 所产生事件的一些示例输出:
要自己生成失败的 `FailedPreStopHook` 事件,请修改
[lifecycle-events.yaml](https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/lifecycle-events.yaml)
文件将 postStart 命令更改为 ”badcommand“ 并应用它。
以下是通过运行 `kubectl describe pod lifecycle-demo` 后你看到的一些结果事件的示例输出:
```
Events: