Do we have support for multi clusters in the Kubernetes integration? If yes, how can we configure the agents for enabling multiple cluster support? Thanks
Hey @prasus,
Yes, the K8s integration does support multi-cluster setups. The dashboards have a cluster template variable / dropdown you can use to select the appropriate cluster.
For this to work, in your agent config, you need to set the external_labels
parameter correctly:
kind: ConfigMap
metadata:
name: grafana-agent
apiVersion: v1
data:
agent.yaml: |
server:
http_listen_port: 12345
prometheus:
wal_directory: /tmp/grafana-agent-wal
global:
scrape_interval: 60s
external_labels:
cluster: cloud
configs:
. . .
By default it is set to cloud
. You can change this to prod
, dev
, etc. depending on your desired cluster name. This will add cluster=prod
etc labels to your metrics, which the dashboards can then use to query appropriately.
Hope this helps!!
Thanks much @anon18522747 for your help! this is super useful, really appreciate it