What if one hungry container could crash your whole app without warning?
Why OOMKilled containers in Kubernetes? - Purpose & Use Cases
Imagine you run a busy restaurant kitchen where chefs have limited counter space. When too many dishes pile up, the kitchen gets overwhelmed and some dishes get dropped or ruined.
Manually tracking memory use of each container is like watching every chef closely all day. It's slow, tiring, and easy to miss when the kitchen runs out of space, causing containers to crash unexpectedly.
Kubernetes automatically monitors container memory use and stops (kills) containers that use too much memory to protect the whole system. This prevents crashes from spreading and helps keep your apps running smoothly.
docker stats container_id
# Manually check memory usage and restart container if neededkubectl describe pod pod-name
# See OOMKilled event and let Kubernetes handle restartsThis lets you run many containers safely without worrying about one using too much memory and crashing everything.
A web app with many users suddenly uses more memory. Kubernetes detects this and stops the heavy container, restarting it cleanly so the app stays available.
OOMKilled means a container used too much memory and was stopped.
Manual memory checks are slow and error-prone.
Kubernetes automates memory limits and container restarts for stability.