[英]How to connect Prometheus in Docker to a Kubernetes cluster?
I am referring to this link ( https://github.com/vegasbrianc/prometheus ) to install Prometheus in Docker version into a Ubuntu server (server-1)我指的是这个链接( https://github.com/vegasbrianc/prometheus )将 Docker 版本的 Prometheus 安装到 Ubuntu 服务器(server-1)中
I also have a Kubernetes cluster (bare-metal) running in another Ubuntu server (server-2).我还有一个 Kubernetes 集群(裸机)在另一个 Ubuntu 服务器(server-2)上运行。 In this Kubernetes cluster, I have some sample apps being deployed.在这个 Kubernetes 集群中,我部署了一些示例应用程序。
I know normally people will deploy Prometheus to the same Kubernetes cluster.我知道通常人们会将 Prometheus 部署到同一个 Kubernetes 集群。
But now, I want to use this Prometheus in server-1 to monitor the apps in Kubernetes cluster in server-2.但是现在,我想在 server-1 中使用这个 Prometheus 来监控 server-2 中 Kubernetes 集群中的应用程序。 How to achieve this?如何做到这一点? Is there any setting/ configuration I have to do to achieve the monitoring?我必须做任何设置/配置来实现监控吗?
假设两台服务器可以相互访问,您需要在 server-2 上配置 prometheus 以抓取在 server-1 上运行的目标,这反过来又必须以 server-2 可以访问的方式公开它们的/metrics
路径( via ingress 是最受欢迎的选择)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.