A Deployment serves a web API whose traffic rises and falls through the day, and the team wants more identical replicas during peaks and fewer during quiet periods. Which autoscaler matches this goal, and what does it change?
- AThe Vertical Pod Autoscaler, because it adds and removes Pod replicas according to the memory requests that have been recorded for the workload over time.
- BThe Horizontal Pod Autoscaler, because it changes the number of Pod replicas in the Deployment in response to observed metrics such as average CPU utilisation. Correct
- CThe cluster autoscaler, because it edits the replicas field of the Deployment directly whenever the CPU on the underlying nodes crosses a set threshold.
- DThe Vertical Pod Autoscaler, because it raises the CPU and memory requests of each running Pod so that a single replica alone can absorb the daily peak.
Why A is wrong: This is tempting because the VPA also reacts to usage, but it does not change replica count; it adjusts the CPU and memory requests of Pods instead.
Why B is correct: The HPA adjusts the replica count of a workload up or down to track a target metric, which is exactly the behaviour of adding replicas at peak and removing them when traffic falls.
Why C is wrong: The cluster autoscaler resizes node pools rather than editing a Deployment, so it never sets the replica count and does not perform the scaling the team wants.
Why D is wrong: This correctly describes VPA behaviour but not the requirement; the team asked for more identical replicas, which is horizontal scaling, not larger single Pods.