Back to all scenarios
Scenario #497
Scaling & Load
Kubernetes v1.21, AWS EKS

Ineffective Pod Affinity Leading to Overload in Specific Nodes

Pod affinity settings caused workload imbalance and overloading in specific nodes.

Find this helpful?
What Happened

Pod affinity rules led to pod placement on only certain nodes, causing those nodes to become overloaded while other nodes remained underutilized.

Diagnosis Steps
  • 1Reviewed pod affinity settings using kubectl describe and found that the affinity rules were too restrictive, limiting pod placement to certain nodes.
  • 2Monitored node resource usage and identified that some nodes were underutilized.
Root Cause

Misconfigured pod affinity rules that restricted pod placement to only certain nodes, leading to resource bottlenecks.

Fix/Workaround
• Reconfigured pod affinity rules to be more flexible and allow better distribution of workloads across all nodes.
• Implemented pod anti-affinity to prevent too many pods from being scheduled on the same node.
Lessons Learned

Pod affinity rules should be carefully configured to prevent bottlenecks in resource allocation.

How to Avoid
  • 1Regularly review and adjust pod affinity/anti-affinity rules to ensure even distribution of workloads.
  • 2Use metrics and monitoring to identify affinity-related issues early.