Solution¶
Triage¶
- Check node conditions:
- List evicted pods:
- Check resource allocation on the node:
- Identify top memory consumers:
Root Cause¶
The kubelet on node-7 is triggering evictions because actual memory usage crosses the eviction threshold (default: memory.available < 100Mi). Multiple pods are deployed without memory requests or limits, meaning:
- The scheduler treats them as BestEffort QoS and cannot account for their real usage when making placement decisions.
- Pods get scheduled to the node because the scheduler sees "available" capacity based on requests, not actual usage.
- When real usage exceeds node capacity, the kubelet evicts pods starting with BestEffort, then Burstable pods exceeding their requests.
- Evicted pods are rescheduled and may land on the same node, repeating the cycle.
Fix¶
Immediate (stop the eviction storm):
- Cordon the node to prevent new scheduling:
- Identify and delete evicted pod shells (they consume etcd storage):
- Manually reschedule heavy workloads to other nodes if needed.
Permanent fix:
- Add memory requests and limits to all deployments:
- Create a LimitRange in each namespace to enforce defaults:
- Set ResourceQuotas per namespace to prevent overcommitment.
- Uncordon the node once resource requests are in place:
Rollback / Safety¶
- Do not uncordon until workloads have proper resource specs.
- Monitor node conditions after uncordoning to confirm stability.
- Review cluster-wide resource utilization to determine if more nodes are needed.
Common Traps¶
- Deleting evicted pods without fixing the cause. They will just be recreated and evicted again.
- Setting requests too low. If requests do not reflect actual usage, overcommitment continues.
- Ignoring disk pressure. The same eviction mechanism triggers for ephemeral storage and inodes.
- Not checking for memory leaks. A single pod with a leak can push the entire node into pressure.
- Relying on limits without requests. If only limits are set, Kubernetes sets requests equal to limits, which may waste capacity. Set both intentionally.