Skip to main content

Why do Pods sometimes get terminated with OOMKilled even when free host memory exists?

Mid Kubernetes
Quick Answer Kubernetes enforces memory limits via cgroups per Pod (container memory.limit_in_bytes). The OOM killer operates at the cgroup level รขโ‚ฌโ€ it can kill a container even if the host has free memory, because the container's memory usage exceeded its cgroup limit. This is intentional รขโ‚ฌโ€ limits are hard boundaries for the container, not the host.

Answer

Pods run under cgroup memory limits; exceeding the limit triggers kernel OOM kill regardless of host memory.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice