Enable multi-cluster support (optional)
The Kube-Prometheus Helm chart offers support for some multi-cluster use cases. You may need to adjust some dashboard panels, recording rules, and alerting rules for your specific architecture. These adjustments go beyond the scope of these instructions.
cluster label to rule aggregations
If you want to modify recording and alerting rules to aggregate metrics over a
cluster label, you can use cortex-tools’
rules prepare command to add a
cluster label to a set of recording and alerting rules. You can modify the aggregation label using the
-l flag. The default label is
cluster. If you use this command, ensure that you have set the corresponding aggregation label using
external_labels in your Prometheus configuration. (If you completed the steps in Migrate a Kube-Prometheus Helm stack, you already set this to
Extract the rules from the Prometheus container by following the instructions in Import recording and alerting rules.
Run the following command in the directory containing the rules files:
mimirtool rules prepare -i *.yaml
-iflag modifies the rules files in place. You can omit this flag to test the command. This command modifies many rules to keep or add a
clusterlabel to aggregations, which enables multi-cluster support.
You must then load the rules into Grafana Cloud Alerting by following the instructions in Import recording and alerting rules.
Enable dashboard multi-cluster support
To enable dashboard multi-cluster support:
values.yamlHelm chart configuration file to enable multi-cluster support for Grafana dashboards:
. . . grafana: sidecar: dashboards: multicluster: true
Apply the changes using
helm upgrade -f values.yaml your_release_name prometheus-community/kube-prometheus-stack
To learn more, refer to the Kube Prometheus Helm chart’s
You must repeat the import dashboards step from the Migrate a Kube-Prometheus Helm stack to Grafana Cloud instructions to import these modified dashboards to Grafana Cloud.