Prometheus Adapter implements the custom.metrics.k8s.io and external.metrics.k8s.io APIs for Kubernetes HPA and VPA, exposing metrics from Prometheus.
Prometheus Adapter is an implementation of the Kubernetes Custom and External Metrics APIs. It allows the Horizontal Pod Autoscaler (HPA) and Vertical Pod Autoscaler (VPA) to scale workloads based on metrics stored in Prometheus, by translating Prometheus queries into the metrics that the Kubernetes API server exposes.
The adapter runs as a Kubernetes API server extension: it registers the custom.metrics.k8s.io and external.metrics.k8s.io API groups and serves metric values by querying Prometheus. It uses in-cluster configuration by default to talk to the Kubernetes API and to your Prometheus instance, and supports configurable discovery and metric mapping rules so you can expose the right Prometheus metrics to HPAs.
For configuration details and walkthroughs, see the Prometheus Adapter documentation.