PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 2 of 25

You deployed an application into a large Standard Google Kubernetes Engine (GKE) cluster. The application is stateless and multiple pods run at the same time. Your application receives inconsistent traffic. You need to ensure that the user experience remains consistent regardless of changes in traffic. and that the resource usage of the cluster is optimized. What should you do?

Full set: 205 questions
Answer options
A: Configure a cron job to scale the deployment on a schedule.
B: Configure a Horizontal Pod Autoscaler. Correct answer
C: Configure a Vertical Pod Autoscaler.
D: Configure cluster autoscaling on the node pool.
Correct Answer:
B. Configure a Horizontal Pod Autoscaler.
Explanation

Horizontal Pod Autoscaler (HPA) automatically adds or removes replicas based on real-time CPU, memory, or custom metrics, keeping request latency stable during demand spikes while downsizing during lulls—optimising both user experience and cluster resource utilisation. A stateless deployment enables seamless replica scaling.

Why Incorrect

A. Cron scaling uses static schedules, cannot react to unpredictable traffic.
C. Vertical Pod Autoscaler adjusts container resources, not replica count; less effective for traffic variability.
D. Node autoscaling changes node count; without HPA pods will not scale to meet demand, and large cluster already exists.

References

1. GKE docs “Horizontal Pod Autoscaling” – overview paragraph 1–2 (https://cloud.google.com/kubernetes-engine/docs/concepts/horizontalpodautoscaler)

2. Google Kubernetes “Best practices for autoscaling” – HPA for workload spikes (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)

Scroll to Top