Back to all scenarios
Scenario #100
Cluster Management
K8s v1.21, GKE
Resource Limits Causing Container Crashes
Containers kept crashing due to hitting resource limits set in their configurations.
Find this helpful?
What Happened
Containers were being killed because they exceeded their resource limits for memory and CPU.
Diagnosis Steps
- 1Used kubectl describe pod to find the resource limits and found that the limits were too low for the workload.
- 2Analyzed container logs and found frequent OOMKilled events.
Root Cause
The resource limits set for the container were too low, causing the container to be terminated when it exceeded the limit.
Fix/Workaround
• Increased the resource limits for the affected containers.
• Re-applied the pod configurations and monitored for stability.
Lessons Learned
Resource limits should be set based on actual workload requirements.
How to Avoid
- 1Use monitoring tools to track resource usage and adjust limits as needed.
- 2Set up alerts for resource threshold breaches to avoid crashes.