如何配置Istio Helm图表以使用外部Kube-prometheus-stack?
我使用 base & istiod 使用此 documents istio-system 名称空间。
我部署了Prometheus,Grafana&使用 kube-prometheus-stack Helm Chart。
此工作负载的每个豆荚都可以正常工作;我没有看到任何错误。不知何故,我没有在Prometheus UI中获得与ISTIO工作量相关的指标。因此,我在Kiali仪表板上没有看到任何网络图。
谁能帮我解决这个问题?
I have deployed the istio service mesh on the GKE cluster using base & istiod helm charts using this documents in the istio-system namespace.
I have deployed Prometheus, grafana & alert-manager using kube-prometheus-stack helm chart.
Every pod of this workload is working fine; I didn't see any error. Somehow I didn't get any metrics in Prometheus UI related to istio workload. Because of that, I didn't see any network graph in kiali dashboard.
Can anyone help me resolve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我能够通过为数据平面和控制平面创建服务监视器来解决上述问题。
请点击下面的链接以获取更多详细信息。
I was able to resolve the above mentioned issue by creating service monitors for data plane and control plane.
Follow below link for more details.
通过通过Kube-Prometheus-stack Helm图表部署Prometheus,您需要为ISTIO指标添加ServiceMonitor,因为K8S注释(
Prometheus.io/scrape
)不起作用。创建这些servicemonitor以启用刮擦iStio指标:一旦创建了这些服务人,指标将在几分钟内开始出现。您可以检查
Prometheus->状态 - 目标
将有类似的条目:servicemonitor/yournamespace/prometheus-oper-istio-controlplane/0(1/1 UP)
和servicemonitor/yournamespace/prometheus-oper-istio-dataplane/0(1/1 up)
With prometheus deployed via kube-prometheus-stack helm charts, you will need to add servicemonitor for istio metrics since k8s annotations (
prometheus.io/scrape
) doesn't work. Create these servicemonitor to enable scraping istio metrics:Once these servicemonitors are created, metrics would start appearing in a few minutes. You can check the status under your
Prometheus -> Status - Targets
There will be entry something like this:serviceMonitor/yournamespace/prometheus-oper-istio-controlplane/0 (1/1 up)
andserviceMonitor/yournamespace/prometheus-oper-istio-dataplane/0 (1/1 up)
ISTIO希望Prometheus通过使用Kubernetes注释
Prometheus.io/scrape
,Prometheus.io/port
,以及Prometheus.io
Prometheus.io, /路径
。普罗米修斯社区已决定,虽然流行的注释虽然不足以实现默认情况下的实用性。因此,Kube-Prometheus-stack Helm图表并未使用这些注释发现POD。
为了使您的Prometheus安装以刮擦您的ISTIO指标,您需要以一种配置ISTIO来以您期望的Prometheus的安装方式公开指标(您必须检查Prometheus配置,我不知道它会通过默认值)或添加Prometheus scrape作业,该作业将使用上述注释进行发现。
有关如何将Prometheus与Istio整合的详细信息可用于在这里配置文件可用在这里。
Istio expects Prometheus to discover which pods are exposing metrics through the use of the Kubernetes annotations
prometheus.io/scrape
,prometheus.io/port
, andprometheus.io/path
.The Prometheus community has decided that those annotations, while popular, are insufficiently useful to be enabled by default. Because of this the kube-prometheus-stack helm chart does not discover pods using those annotations.
To get your installation of Prometheus to scrape your Istio metrics you need to either configure Istio to expose metrics in a way that your installation of Prometheus expects (you'll have to check the Prometheus configuration for that, I do not know what it does by default) or add a Prometheus scrape job which will do discovery using the above annotations.
Details about how to integrate Prometheus with Istio are available here and an example Prometheus configuration file is available here.
需要在kube-prometheus-stack-stack helm Chart value.yaml中添加iStio的添加添加的crapconfigs。
Need to add additionalScrapConfigs for istio in kube-prometheus-stack helm chart values.yaml.