From 6ce976318cf32bf24f1e5064cae19fce141566ec Mon Sep 17 00:00:00 2001 From: Stewart-YU Date: Tue, 12 Jun 2018 07:43:27 +0800 Subject: [PATCH] update debug-application-cluster/termination.yaml (#8837) --- .../determine-reason-pod-failure.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md b/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md index 3b56840ab2..fad76987fe 100644 --- a/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md +++ b/content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md @@ -38,7 +38,7 @@ the container starts. 1. Create a Pod based on the YAML configuration file: - kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/termination.yaml + kubectl create -f https://k8s.io/docs/tasks/debug-application-cluster/termination.yaml In the YAML file, in the `cmd` and `args` fields, you can see that the container sleeps for 10 seconds and then writes "Sleep expired" to @@ -47,13 +47,13 @@ the container starts. 1. Display information about the Pod: - kubectl get pod termination-demo + kubectl get pod termination-demo Repeat the preceding command until the Pod is no longer running. 1. Display detailed information about the Pod: - kubectl get pod --output=yaml + kubectl get pod --output=yaml The output includes the "Sleep expired" message: @@ -72,9 +72,7 @@ the container starts. 1. Use a Go template to filter the output so that it includes only the termination message: -``` - kubectl get pod termination-demo -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}" -``` + kubectl get pod termination-demo -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}" ## Customizing the termination message