k8wiz
Kubernetes
Easy
Troubleshooting

A container restarted after an out-of-memory kill. Which field of the Kubernetes pod status records that the previous run was OOMKilled?

Select your answer:

Show answer and explanation

Answer: status.containerStatuses[].lastState.terminated.reason

Explanation

Once the kubelet restarts the container, state describes the new run and lastState keeps how the previous run ended, including reason OOMKilled and exitCode 137. kubectl describe shows it as Last State. status.reason is set at the pod level for things like a kubelet eviction, not for a container OOM kill.

Read more about Kubernetes