Configure data source for pre-made Kubernetes alerting rules/dashboards

  • What Grafana version and what operating system are you using?

Grafana Cloud

  • What are you trying to achieve?

I want to use the pre-made dashboards and alerting rules included in the Kubernetes observability feature with the correct data source.

  • How are you trying to achieve it?

I added my data source and made it the default.
Then I configured my data source under Observability->Kubernetes->Configuration->Data sources->Prometheus data source.
Finally I pressed “Install” in the section “Dashboards, alert rules and recording rules” below that.

  • What happened?

The dashboards and alerting rules did get installed, but pointing at an incorrect, different data source. Furthermore, the data source dropdown is greyed out when attempting to edit the rules.

  • What did you expect to happen?

I expected the installed dashboards and rules to either respect the data source settings configured on exactly the same page or at least respect and use the default data source.

  • Can you copy/paste the configuration(s) that you are having problems with?

Not sure what I could paste here that I haven’t described in text.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Beyond “no data”, nothing.

  • Did you follow any online instructions? If so, what is the URL?

For anyone seeing this thread, I was made aware on Slack that the alert and dashboard templates are publicly available over at GitHub - grafana/kubernetes-mixin: A set of Grafana dashboards and Prometheus alerts for Kubernetes..
Using these it’s possible to generate dashboards using appropriate data sources and other useful configuration changes.