A city 311 API spikes at lunch and should gain Pods when CPU is high. Which control plane object scales Deployment replicas from resource metrics like CPU?
Select an answer to reveal the explanation.
Short Explanation
HPA is the thermostat for Pod count—when CPU heat rises past the setpoint, it spins up more replicas for 311. It is not a StorageClass or IngressClass job.
Full Explanation
A city 311 API that spikes at lunch and should gain Pods when CPU is high needs a HorizontalPodAutoscaler. HPA scales the replica count of a target such as a Deployment based on resource metrics like CPU (and optionally memory or custom metrics). For lunchtime citizen spikes against 311, HPA raises desired replicas when utilization exceeds the target and scales down when load falls, which is the control-plane object CKA associates with metric-driven horizontal capacity.
IngressClass only selects which Ingress controller implementation should handle Ingress objects; it does not CPU-scale Deployment replicas. StorageClass defines how PersistentVolumes are dynamically provisioned; it is storage, not autoscaling. A MutatingWebhookConfiguration alone admits or mutates API objects at admission time; it does not continuously scale replicas from CPU metrics.
Exam caveat: resource-based HPA needs a metrics pipeline (commonly Metrics Server) and CPU requests on containers for utilization targets to mean anything. Operational check: create an HPA against the 311 Deployment with min/max replicas and a CPU target, then kubectl get hpa and describe hpa during a load test to confirm desired replicas move with utilization.