Prometheus Adapter for Kubernetes Metrics APIs: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
{{External|https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-adapter}} | {{External|https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-adapter}} | ||
[[Prometheus_Installation_with_Helm#Install|Install Prometheus first]]. | [[Prometheus_Installation_with_Helm#Install|Install Prometheus first]]. | ||
The adapter will be installed in the same namespace as Prometheus. | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | ||
helm search repo prometheus-community | helm search repo prometheus-community | ||
</syntaxhighlight> | |||
helm install -n prometheus | <syntaxhighlight lang='bash'> | ||
helm install -n prometheus prometheus-adapter prometheus-community/prometheus-adapter -f ./prometheus-adapter-overlay.yaml: | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 02:13, 15 October 2020
External
- https://github.com/DirectXMan12/k8s-prometheus-adapter
- https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-adapter
Internal
Overview
The Prometheus adapter is a Kubernetes Aggregation Layer extension.
Helm Installation
The adapter will be installed in the same namespace as Prometheus.
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm search repo prometheus-community
helm install -n prometheus prometheus-adapter prometheus-community/prometheus-adapter -f ./prometheus-adapter-overlay.yaml:
See Configuration below for prometheus-adapter-overlay.yaml.
Test installation:
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1 | jq
{
"kind": "APIResourceList",
"apiVersion": "v1",
"groupVersion": "custom.metrics.k8s.io/v1beta1",
"resources": []
}
Configuration
Use the following prometheus-adapter-overlay.yaml:
helm show values prometheus-community/prometheus-adapter > ~/tmp/prometheus-adapter-overlay.yaml
Increase log level when installing the chart.
Troubleshooting
tail the logs, Prometheus connection refused is reported there.