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.
More easy Kubernetes questions
- A container writes files to an emptyDir volume with medium: Memory. What do those files count against?
- Which kubectl command is used to view the logs of a pod?
- What is a Pod in Kubernetes?
- What is the purpose of a Kubernetes Service?
- Which command would you use to create a deployment from a YAML file?
- Which kubectl command would you use to get detailed information about a specific pod?