Interview Prep/Kubernetes/Reliability & Rollouts

Why does a Pod get OOMKilled even though the app heap looks small?

IntermediateProductionReliability & Rollouts
Answer

The container limit counts all memory: heap plus metaspace, thread stacks, native buffers, page cache attributable to the cgroup, and emptyDir: Memory. Set JVM -XX:MaxRAMPercentage=70, leave headroom, and watch container_memory_working_set_bytes (what the OOM killer and kubelet use), not RSS alone.

All Kubernetes questions

More on Reliability & Rollouts