Skip to content

Commit 481eff6

Browse files
committed
Add multi-container info on pod failure docs
1 parent e3d0384 commit 481eff6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

content/en/docs/tasks/debug-application-cluster/determine-reason-pod-failure.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ only the termination message:
7575

7676
kubectl get pod termination-demo -o go-template="{{range .status.containerStatuses}}{{.lastState.terminated.message}}{{end}}"
7777

78+
1. If you are running a multi-container pod, you can use a Go template to include the container's name. By doing so, you can discover which of the containers is failing (please note that the `multi-container-pod` creation is not covered in this exercise):
79+
80+
kubectl get pod multi-container-pod -o go-template='{{range .status.containerStatuses}}{{printf "%s:\n%s\n\n" .name .lastState.terminated.message}}{{end}}'
81+
82+
7883
## Customizing the termination message
7984

8085
Kubernetes retrieves termination messages from the termination message file

0 commit comments

Comments
 (0)