Scraping kube-dns for Metrics Kubernetes and Prometheus


I had installed Prometheus via the Helm Chart. Most everything worked great out of the box, but it failed to scrape /metrics on the kube-dns pods.


By default, the Prometheus Helm Chart will scrape kube-dns pods on port 53. Adding annotations, telling Prometheus to scrape and the port number, corrects this issue.


Locate the service object for kube-dns. Add these two annotations inside of the metadata section:

"annotations": {
  "": "9153",
  "": "true"

This is a preview of Clap Button, a new feedback and analytics tools for Hydejack, built by yours truly. You can try it out on localhost for free, but it will be removed (together with this message) when building with JEKYLL_ENV=production. To use Clap Button on your site, get a subscription
and set clap_button: true in your config file.

© 2021. All rights reserved.