I am referring to this link (https://github.com/vegasbrianc/prometheus) to install Prometheus in Docker version into a Ubuntu server (server-1)
I also have a Kubernetes cluster (bare-metal) running in another Ubuntu server (server-2). In this Kubernetes cluster, I have some sample apps being deployed.
I know normally people will deploy Prometheus to the same Kubernetes cluster.
But now, I want to use this Prometheus in server-1 to monitor the apps in Kubernetes cluster in server-2. How to achieve this? Is there any setting/ configuration I have to do to achieve the monitoring?
CodePudding user response:
Assuming both servers can access each other, you will need to configure the prometheus on server-2 to scrape the targets running on server-1, which in turn will have to expose their /metrics
path in a way that server-2 can access (via ingress is the most popular choice).