首页 > 解决方案 > Anthos 服务网格指标

问题描述

我最近部署了 Anthos Service Mesh,开始使用交钥匙方法来部署 GKE 和 Istio。到目前为止一切顺利,但我看到的一个问题是 pod 的基本指标(CPU、内存和磁盘)没有显示出来。

当我查看 prometheus-to-sd pod 的日志时,我看到以下错误:

Error while sending request to Stackdriver googleapi: Error 403: Permission monitoring.timeSeries.create denied (or the resource may not exist)., forbidden

fluentd-gke pod 的类似错误。

Unable to export to Monitoring service because: GaxError RPC failed, caused by 7:Permission monitoring.timeSeries.create denied (or the resource may not exist).

我尝试使用 GCP SA 到 KSA 映射来调整 Workload Identity 权限,但没有成功。还有其他人遇到这个吗?

这些是我一直遵循的指示。

https://cloud.google.com/service-mesh/docs/gke-anthos-cli-new-cluster

标签: google-kubernetes-enginegoogle-anthosgoogle-anthos-service-mesh

解决方案


事实证明 Workload Identity 不适用于主机网络设置为 true 的 Pod。有人会认为 Anthos 可以开箱即用地启用对 pod 和计算节点的基本监控。

解决此问题的两个选项:

1.) Update the default compute engine account with the following roles:
-roles/logging.logWriter
-roles/monitoring.metricWriter
-roles/monitoring.viewer

2.) Deploy the node pools with a custom service account with the aforementioned roles.

为了让事情顺利进行,我使用了选项 #1。


推荐阅读