Menu

1 / 3

metrics-server's Helm chart made its health checks depend on the apiserver

DEV Community: kubernetes·Sai Pisey·14 days ago
#v9Bkxtyq
#devtokubernetes#devto#dev#metrics#apiserver
Long article (568 words) — no AI summary yet.
Reading 0:00
15s threshold

If you run metrics-server from its Helm chart and scrape it with Prometheus, you've probably set metrics.enabled: true . The chart needs it before it will create a ServiceMonitor. The README says it will "allow unauthenticated access to /metrics ", and it does.

It also makes every health check metrics-server answers depend on the Kubernetes apiserver.

Someone reported this in October, already traced to a chart change from January 2022, with the one-line fix. I sent the PR, #1904 , with before and after numbers from a kind cluster, and the chart maintainer merged it on 12 November. It isn't in a chart release yet, so the workaround below is what you can use today.

One flag, one value

metrics-server is built on k8s.io/apiserver . Requests to its HTTPS port are authorized by asking the real apiserver, with a SubjectAccessReview .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.