How to integrate Prometheus with Kubernetes where both are running on different host?

10/16/2019

My prometheus server is running on different server. Also I have another kubernetes cluster. So, I need monitoring kubernetes pod metrics using prometheus running on different servers.

-- Udeni Balasooriya
kubernetes
prometheus

1 Answer

10/16/2019

To monitor external cluster I would take advantage of Prometheus federation topology.

  • In your Kubernetes cluster install node-exporter pods and configure Prometheus with short-term storage.
  • Expose the Prometheus service (you can follow this guide) outside of Kubernetes cluster, this can be done either by LB or a node port.
  • Configure the Prometheus server to scrape metrics from Kubernetes endpoints configuring them with correct tags and proper authentication.
-- Crou
Source: StackOverflow