Kubernetes Integration multi cluster support

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
  name: grafana-agent
apiVersion: v1
  agent.yaml: |    
      http_listen_port: 12345
      wal_directory: /tmp/grafana-agent-wal
        scrape_interval: 60s
          cluster: cloud
. . . 

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 @hjet for your help! this is super useful, really appreciate it :pray: