PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #133
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…
The correct answer is B. Configure a Horizontal Pod Autoscaler. To ensure consistent user experience and optimize resource usage for a stateless application with inconsistent traffic in GKE, configure a Horizontal Pod Autoscaler to automatically adjust the number of pods based on demand.
Question
Options
- AConfigure a cron job to scale the deployment on a schedule
- BConfigure a Horizontal Pod Autoscaler.
- CConfigure a Vertical Pod Autoscaler
- DConfigure cluster autoscaling on the node pool.
How the community answered
(43 responses)- A5% (2)
- B84% (36)
- C9% (4)
- D2% (1)
Why each option
To ensure consistent user experience and optimize resource usage for a stateless application with inconsistent traffic in GKE, configure a Horizontal Pod Autoscaler to automatically adjust the number of pods based on demand.
A cron job scales on a fixed schedule, which is inefficient and ineffective for applications with inconsistent and unpredictable traffic patterns.
A Horizontal Pod Autoscaler automatically scales the number of pod replicas for a deployment up or down based on observed CPU utilization or other metrics, directly addressing inconsistent traffic to maintain consistent user experience and optimize resource usage.
A Vertical Pod Autoscaler optimizes resource requests and limits for *individual* pods, but it does not scale the *number* of pods to handle fluctuating traffic loads.
Cluster autoscaling manages the number of nodes in the cluster, but it depends on the number of requested pods; it doesn't directly scale the application's pods in response to traffic, making HPA necessary first to scale pods.
Concept tested: Kubernetes autoscaling (Horizontal Pod Autoscaler)
Source: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
Topics
Community Discussion
No community discussion yet for this question.