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.
More on Reliability & Rollouts
What are the must-have settings for a production Deployment?BeginnerWhy use image digests or immutable tags instead of `latest`?BeginnerWhat does a PodDisruptionBudget protect and how do you size it?BeginnerHow do you set graceful shutdown right?BeginnerWhy do rollouts sometimes cause brief 502/503 errors?BeginnerHow many replicas should you run and how do you spread them?Beginner