Back to all scenarios
Scenario #64
Cluster Management
K8s v1.19, GKE

Excessive Pod Restarts Due to Resource Limits

A pod was restarting frequently due to resource limits being too low, causing the container to be killed.

Find this helpful?
What Happened

Pods were being killed and restarted due to the container’s resource requests and limits being set too low, causing OOM (Out of Memory) kills.

Diagnosis Steps
  • 1Checked pod logs and identified frequent OOM kills.
  • 2Reviewed resource requests and limits in the pod spec.
Root Cause

Resource limits were too low, leading to the container being killed when it exceeded available memory.

Fix/Workaround
• Increased the memory limits and requests for the affected pods.
• Re-deployed the updated pods and monitored for stability.
Lessons Learned

Proper resource requests and limits should be set to avoid OOM kills and pod restarts.

How to Avoid
  • 1Regularly review resource requests and limits based on workload requirements.
  • 2Use resource usage metrics to set more accurate resource limits.