title: Prometheus for k8s multi clusters
body: <p>I have 3 kubernetes clusters (prod, test, monitoring). Iam new to prometheus so i have tested it by installing it in my test environment with the helm chart:</p>
  <pre><code># https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack
  helm install [RELEASE_NAME] prometheus-community/kube-prometheus-stack
  </code></pre>
  <p>But if i want to have metrics from the prod and test clusters, i have to repeat the same installation of the helm and each &quot;kube-prometheus-stack&quot; would be standalone in its own cluster. It is not ideal at all. Iam trying to find a way to have a single prometheus/grafana which would federate/agregate the metrics from each cluster's prometheus server.<br/></p>
  <p>I found this link, saying about prometheus federation:</p>
  <pre><code>https://prometheus.io/docs/prometheus/latest/federation/
  </code></pre>
  <p>If install the helm chart &quot;kube-prometheus-stack&quot; and get rid of grafana on the 2 other cluster, how can i make the 3rd &quot;kube-prometheus-stack&quot;, on the 3rd cluster, scrapes metrics from the 2 other ones?<br/>
  thanks</p>