Back to all scenarios
Scenario #432
Scaling & Load
Kubernetes v1.22, GCP

Auto-Scaling Hit Limits with StatefulSet

StatefulSet scaling hit limits due to pod affinity constraints.

Find this helpful?
What Happened

Auto-scaling did not trigger correctly due to pod affinity constraints limiting scaling.

Diagnosis Steps
  • 1Found pod affinity rules restricted the number of eligible nodes for scaling.
  • 2Logs showed pod scheduling failure during scale-up attempts.
Root Cause

Tight affinity rules prevented pods from being scheduled to new nodes.

Fix/Workaround
• Adjusted pod affinity rules to allow scaling across more nodes.
Lessons Learned

Pod affinity must be balanced with scaling needs.

How to Avoid
  • 1Regularly review affinity and anti-affinity rules when using HPA.
  • 2Test autoscaling scenarios with varying node configurations.