A Pod was OOMKilled, but `container_memory_usage_bytes` was well below the limit.
AdvancedTroubleshootingResources, OOM, probes and termination
Answer
Likely causes → You watched the wrong metric or the wrong resolution. usage_bytes includes reclaimable page cache; the OOM decision follows the working set and spikes faster than a 30s scrape. Also, memory used by emptyDir with medium: Memory (tmpfs) counts against the container limit.
Diagnose →
max_over_time(container_memory_working_set_bytes{pod="api-x",container="app"}[10m])
kubectl get pod api-x -o jsonpath='{.spec.volumes}' | jq '.[] | select(.emptyDir.medium=="Memory")'
Fix → Size limits from working_set maximums, set sizeLimit on memory-backed emptyDirs, and use shorter scrape intervals for bursty services.
Prevent → Standardise memory dashboards on working set and kube_pod_container_status_last_terminated_reason.
More on Resources, OOM, probes and termination
`kubectl describe pod` shows `Last State: Terminated, Reason: OOMKilled, Exit Code: 137`.BeginnerA Java service is OOMKilled at 2 GiB limit but the heap is only `-Xmx1800m`.IntermediateMany Pods on one node were killed at once and the node shows a `SystemOOM` event. Container limits were not reached.AdvancedPods show `Evicted` with `The node was low on resource: memory. Threshold quantity: 100Mi, available: 87Mi. Container app was using 1.4Gi, request is 256Mi`.IntermediateA Pod is evicted with `Pod ephemeral local storage usage exceeds the total limit of containers 1Gi`.Intermediatep99 latency spikes every few seconds, CPU usage graph shows only 40% of the limit.Advanced