How do you tune HPA to avoid flapping and to react to spikes?
IntermediateProductionAutoscaling, Capacity & Cost
Answer
Use behavior: fast scale-up policies (for example 100% or +4 Pods per 15 s), slower scale-down with stabilizationWindowSeconds: 300+, a sensible target (60-70% CPU), and correct minReplicas to survive a zone loss. For spiky traffic, scale on request rate or queue length via KEDA instead of lagging CPU.
More on Autoscaling, Capacity & Cost
How do you right-size requests and limits?BeginnerWhy does HPA need accurate CPU requests?BeginnerWhat are Spot instances good for on Kubernetes?BeginnerHow do you reduce Kubernetes cost quickly?BeginnerWhat is metrics-server and what does it not do?BeginnerWhat is a good default for the node size and why?Beginner