Custom Metrics with Prometheus Adapter¶
The Prometheus Adapter is a Kubernetes component used to implement autoscaling based on custom metrics. While the standard Metrics Server facilitates scaling for resource Metrics like CPU and memory (utilized by tools such as kubectl top and the Horizontal Pod Autoscaler), it does not support custom metrics^[400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md#L5-L6]. The Prometheus Adapter fills this gap by retrieving Metrics from a Prometheus backend and making them available to the Kubernetes Horizontal Pod Autoscaler^[400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md#L6-L7].
Relationship to Metrics Server¶
In Kubernetes AutoScaling, a distinction is made between standard resource Metrics and custom metrics^[400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md#L3-L5].
- Metrics Server: Collects core resource Metrics (CPU/Memory).
- Prometheus Adapter: Enables autoscaling based on custom application-specific metrics^[400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md#L6-L7].
To configure custom metric autoscaling, one must deploy the Prometheus Adapter, as the Metrics Server is designed solely for resource metrics^[400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md#L6-L7].
Sources¶
- 400-devops__06-Kubernetes__devops-helm__terraform-helm__helm__charts__metrics-server__README.md