Back to all scenarios
Scenario #424
Scaling & Load
Kubernetes v1.25, AKS

Autoscaler Failed During StatefulSet Upgrade

Horizontal scaling issues occurred during rolling upgrade of StatefulSet.

Find this helpful?
What Happened

StatefulSet failed to scale out during a rolling upgrade, causing delayed availability of new pods.

Diagnosis Steps
  • 1Observed kubectl get pods showing delayed stateful pod restarts.
  • 2HPA did not trigger due to stuck pod state.
Root Cause

Rolling upgrade conflicted with autoscaler logic due to StatefulSet constraints.

Fix/Workaround
• Adjusted StatefulSet rollingUpdate strategy.
• Tuned autoscaler thresholds for more aggressive scaling.
Lessons Learned

Ensure compatibility between scaling and StatefulSet updates.

How to Avoid
  • 1Test upgrade and scaling processes in staging environments.
  • 2Separate stateful workloads from stateless ones for scaling flexibility.