Scale your own way, using HPA with built-in support for PromQL metrics queries in GKE
Story summary
Earlier this year, we announced native support for Google Kubernetes Engine (GKE) custom metrics. This milestone allowed you to scrap external adapters and instead collect autoscaling metrics directly from your pods. By routing these metrics straight to the Horizontal Pod Autoscaler (HPA), we cut me
📌 Key Highlights & Takeaways
- Earlier this year, we announced native support for Google Kubernetes Engine (GKE) custom metrics.
- This milestone allowed you to scrap external adapters and instead collect autoscaling metrics directly from your pods.
- By routing these metrics straight to the Horizontal Pod Autoscaler (HPA), we cut me
Earlier this year, we announced native support for Google Kubernetes Engine (GKE) custom metrics. This milestone allowed you to scrap external adapters and instead collect autoscaling metrics directly from your pods. By routing these metrics straight to the Horizontal Pod Autoscaler (HPA), we cut metrics reading latency down to 5 seconds.
Today, we are excited to introduce built-in support for processing Prometheus metrics, allowing you to use expressive PromQL queries to customize autoscaling triggers. With this update, HPA can now directly process autoscaling metrics present in Cloud Monitoring using Google Managed Service for Prometheus. Reading metrics from these backends will not require third-party adapters, leveraging the AutoscalingMetric integration used to support pod-level metrics. After the preview, we plan to support self-hosted Prometheus servers as we move to general availability.
Support for custom pod-level metrics made autoscaling more straightforward, but production workloads often need to scale on multiple, complex infrastructure metrics. Common examples include scaling:
a worker pool based on the number of unacknowledged messages in a Pub/Sub topic
an inference service based on query-per-second (QPS) metrics stored in Cloud Monitoring / Prometheus
a webserver farm based on the 95th percentile of their measured response time
To achieve this, you used to need to deploy an external adapter like the Stackdriver Custom Metrics Adapter or the Prometheus adapter to retrieve the metrics from an external logging environment. While this sounds straightforward at first, these adapters introduce a lot of operational friction:
Management overhead: Platform teams have to install, configure, patch, and monitor these third-party components.
Cryptographic Security & Key Generator
Generate entropy-tested high-security keys and encryption-grade tokens.
Source: Cloud Blog.
Unlock Up to $10,000 in Free AWS, GCP & Azure Credits for Builders and Developers
The developer portal for modern cloud infrastructure: claim free cloud credits, discover generous free-tier developer tools, and optimize DevOps pipelines.
Claim Cloud Credits ➔☁️ Complete Cloud Credit Application Guide & Architecture Specs
Direct application templates, fast-track partner codes, and architecture benchmarks.
⚡ Access Cloud Playbook ➔