【发布时间】:2020-05-20 20:38:38
【问题描述】:
我想从集群中的另一个 pod 访问由 Istio 运行的 Prometheus 服务。在我使用Kind 的本地开发环境中,我可以通过http://prometheus.istio-system.svc.cluster.local:9090 访问它。我希望在 GKE 上做同样的事情,所以我在 GKE 中使用 Istio addon 建立了一个集群:
gcloud beta container clusters create $GCLOUD_CLUSTER_NAME \
--addons=HorizontalPodAutoscaling,Istio \
--machine-type=n1-standard-2 \
--num-nodes=4 \
--cluster-version=latest --zone=$GCLOUD_CLUSTER_ZONE \
--enable-stackdriver-kubernetes --enable-ip-alias \
--enable-autorepair \
--scopes cloud-platform \
--preemptible
起初,我很困惑,因为我在istio-system 命名空间中没有看到prometheus 服务,然后我得知它们是renamed the prometheus service to promsd for Istio on GKE。我试图通过http://promsd.istio-system.svc.cluster.local:9090/ 访问 Prometheus,但没有成功。我尝试从另一个 pod 向它发送 telnet 以测试连接性,但我得到了 Connection Refused:
root@shiny-wordcloud-69684cd88-lhxc8:/# telnet promsd.istio-system.svc.cluster.local 9090
Trying 10.0.1.215...
telnet: Unable to connect to remote host: Connection refused
然后我看到有 instructions for enabling Prometheus for Istio on GKE 并且很困惑,因为我认为 Prometheus 是开箱即用的 Istio。
我的问题是:
- 有没有办法访问 promsd 服务?
- instructions for enabling Prometheus for Istio on GKE 的用途是什么?这是在 GKE 中访问 Prometheus 指标的正确方法吗?
【问题讨论】:
标签: google-kubernetes-engine prometheus istio