A DevOps team is deploying a web application on Google Kubernetes Engine (GKE) that experiences daily traffic spikes. They want to automatically adjust the number of pod replicas based on CPU utilization. Which Kubernetes resource should they use?
HPA automatically scales the number of pod replicas based on observed CPU/memory utilization or custom metrics.
Why this answer
The Horizontal Pod Autoscaler (HPA) automatically scales the number of pod replicas based on resource utilization metrics like CPU or memory. The Vertical Pod Autoscaler (VPA) adjusts resource requests/limits, not replica count. Cluster Autoscaler adjusts node count, not pods.
PodDisruptionBudget controls voluntary disruptions.