google-kubernetes-engine - 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
解决方案
事实证明 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。
推荐阅读
- python - Python:如何根据两个不同列中的大于条件删除文本文件中的数据行?
- r - 面板数据,从宽到长,具有多个变量
- laravel - 如何将多个字符串变量传递给 Laravel Gate
- ios - iOS:通过蓝牙进行 SSL 握手
- python - Pytest 基本示例因配置错误而失败
- tensorflow - Tensorflow Hub Inception V3 结构与 Keras Inception V3 结构相比?
- mysql - 'MySQL STR_TO_DATE 字符串中没有日期
- python - 如何检查字符串中子字符串的多次出现?
- javascript - 我无法使用 AJAX 向服务器发送数据
- macos - Vue CLI 无法为 Mac Mojave 安装