Cloud Digital Leader Scaling with Google Cloud operations Practice Question
A team deploys microservices on GKE with Horizontal Pod Autoscaler (HPA). They want to scale based on custom metrics from third-party monitoring. What must they do first?
⚠ Common exam trap
Google Cloud often tests the misconception that enabling a monitoring service (like Cloud Monitoring) alone is sufficient for HPA to use custom metrics, when in fact a dedicated API adapter is required to expose those metrics to the Kubernetes control plane.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Install the custom metrics API adapter.
B is correct because Horizontal Pod Autoscaler (HPA) in GKE relies on the custom.metrics.k8s.io API to retrieve custom metrics from external monitoring systems. To expose these metrics to the HPA, you must install a custom metrics API adapter (e.g., the Prometheus Adapter or Google Cloud's custom-metrics-stackdriver-adapter) that translates the third-party monitoring data into the format the Kubernetes API server expects. Without this adapter, the HPA cannot query the custom metrics and will fail to scale.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Cluster Autoscaler.
Why it's wrong here
Cluster Autoscaler operates at the node pool level, scaling the number of GKE nodes based on cluster resource availability and pending pods that cannot be scheduled. It does not observe application-level custom metrics such as queue depth or request latency, and it cannot directly influence the replica count managed by the HPA. Without a custom metrics adapter, the HPA has no way to know that it should scale horizontally based on those metrics, so Cluster Autoscaler cannot substitute for the adapter.
- ✓
Install the custom metrics API adapter.
Why this is correct
The HPA reads custom application metrics through the custom.metrics.k8s.io API, which is an API extension that must be implemented by an adapter installed in the cluster. For GKE, you typically deploy the Google Cloud Monitoring adapter (or a third-party like the Prometheus adapter), which registers an APIService and translates HPA metric queries into backend monitoring queries. Once installed, you can reference these custom metrics in the HPA spec, allowing scaling decisions based on values like Pub/Sub backlog or custom business counters. Without this adapter, the HPA has no endpoint to retrieve custom metric values, even if the metrics are already being collected elsewhere.
- ✗
Enable Cloud Monitoring and configure custom metrics.
Why it's wrong here
Enabling Cloud Monitoring and configuring custom metrics ensures that the metrics are captured, stored, and queryable within Google Cloud, but this does not automatically expose them to Kubernetes. The HPA requires a Kubernetes API object—the adapter—to serve those metrics via the custom.metrics.k8s.io endpoint. The Stackdriver/Cloud Monitoring adapter is the component that bridges Cloud Monitoring to the HPA by translating API requests and fetching the latest metric values. Simply having Cloud Monitoring enabled may set up dashboards and alerting, but it does not install the adapter needed by the HPA to consume the metrics for scaling.
- ✗
Use Vertical Pod Autoscaler.
Why it's wrong here
Vertical Pod Autoscaler (VPA) adjusts the CPU and memory resource requests and limits of existing pods based on historical utilization, changing how much compute each pod receives. It does not alter the number of replicas, and it cannot read custom metrics to decide when to scale the application horizontally. The HPA targets the replica count; VPA targets the per-pod resource allocation. While VPA and HPA can be used together, VPA is not a substitute for the custom metrics API adapter—it cannot respond to a custom metric that indicates a need for more instances.
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
Autoscaler
An Autoscaler is a cloud service that automatically increases or decreases the number of virtual machines (instances) or resources based on real-time demand, so your application always has enough capacity without wasting money on idle servers.
Key term
Google Cloud
Google Cloud is a suite of cloud computing services offered by Google that provides infrastructure, platform, and software solutions over the internet.
About these practice questions
One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.