Google Cloud Professional Cloud DevOps Engineer — Question 46
Your team has recently deployed an NGINX-based application into Google Kubernetes Engine (GKE) and has exposed it to the public via an HTTP Google Cloud
Load Balancer (GCLB) ingress. You want to scale the deployment of the application's frontend using an appropriate Service Level Indicator (SLI). What should you do?
Answer options
- A. Configure the horizontal pod autoscaler to use the average response time from the Liveness and Readiness probes.
- B. Configure the vertical pod autoscaler in GKE and enable the cluster autoscaler to scale the cluster as pods expand.
- C. Install the Stackdriver custom metrics adapter and configure a horizontal pod autoscaler to use the number of requests provided by the GCLB.
- D. Expose the NGINX stats endpoint and configure the horizontal pod autoscaler to use the request metrics exposed by the NGINX deployment.
Correct answer: C
Explanation
The correct answer is C because using the Stackdriver custom metrics adapter allows the horizontal pod autoscaler to utilize real-time request metrics from the GCLB, enabling effective scaling based on actual demand. Option A is incorrect as Liveness and Readiness probes are not suitable for scaling decisions; option B focuses on vertical scaling rather than horizontal, which is not ideal for managing frontend load; option D, while it suggests using metrics, does not leverage the GCLB's built-in request metrics, which are more reliable for this purpose.