Back to all scenarios
Scenario #405
Scaling & Load
Kubernetes v1.23, AWS EKS
Cluster Autoscaler Didn't Scale Due to Pod Affinity Rules
Workloads couldn't be scheduled and CA didn’t scale nodes because affinity rules restricted placement.
Find this helpful?
What Happened
Pods failed to schedule and were stuck in Pending, but no scale-out occurred.
Diagnosis Steps
- 1Events: FailedScheduling with affinity violations.
- 2CA logs: “no matching node group”.
Root Cause
Pod anti-affinity restricted nodes that CA could provision.
Fix/Workaround
• Relaxed anti-affinity or labeled node groups appropriately.
Lessons Learned
Affinity rules affect autoscaler decisions.
How to Avoid
- 1Use soft affinity (preferredDuringScheduling) where possible.
- 2Monitor unschedulable pods with alerting.