
Kubernetes autoscaling: HPA vs VPA vs KEDA — which one when?
Kubernetes Autoscaling: HPA vs VPA vs KEDA — Which One When? Your pod is spiking to 8GB memory. HPA won't help. Neither will VPA alone. You need a decision framework, not three tools fighting each other. HPA: Reactive scaling by metrics Horizontal Pod Autoscaler watches CPU/memory and adds more replicas. It's the default, it works, and it's best for stateless workloads with unpredictable traffic . apiVersion : autoscaling/v2 kind : HorizontalPodAutoscaler metadata : name : api-server-hpa spec : scaleTargetRef : apiVersion : apps/v1 kind : Deployment name : api-server minReplicas : 3 maxReplicas : 20 metrics : - type : Resource resource : name : cpu target : averageUtilization : 70 When to use: Web APIs, microservices, event processors scaling with user load. Gotcha: Doesn't solve resource inefficiency. If your pod only needs 256Mi but requests 512Mi, HPA scales at the wrong threshold. VPA: Right-sizing without replica chaos Vertical Pod Autoscaler recommends CPU/memory requests, then e
Continue reading on Dev.to DevOps
Opens in a new tab



