Interview Prep/Monitoring & Observability/Grafana, Dashboards and Kubernetes Monitoring

Pods are being OOMKilled but the memory graph never reaches the limit. Why?

IntermediateScenarioGrafana, Dashboards and Kubernetes Monitoring
Answer

Situation read → Scrape intervals miss short spikes, or the wrong memory metric is graphed.

What I'd do →

  1. Graph container_memory_working_set_bytes (what the kubelet and OOM decisions relate to), not container_memory_usage_bytes which includes cache.
  2. Confirm kills: kube_pod_container_status_last_terminated_reason{reason="OOMKilled"} and increase(kube_pod_container_status_restarts_total[1h]).
  3. Remember a 30s scrape cannot see a 2-second spike; check container_oom_events_total (cAdvisor).
  4. Profile the app (heap dumps, JVM -XX:MaxRAMPercentage) and set limits based on peak, not average.

Why → OOM kills happen in milliseconds; averages and sparse scrapes hide them.

Interview tip → Know working_set vs usage vs rss; it comes up often.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Grafana, Dashboards and Kubernetes Monitoring