【问题标题】:How to enable & use workload monitoring on a GKE Autopilot mode cluster如何在 GKE Autopilot 模式集群上启用和使用工作负载监控
【发布时间】:2021-12-28 22:24:10
【问题描述】:

Autopilot overview 文档声称处于 Autopilot 模式的 Google Cloud Kubernetes Engine (GKE) 集群支持监控预配置:系统监控可选:系统和工作负载监控.

我想在 Autopilot 集群上使用上述工作负载监控,使用 apiVersion: monitoring.gke.io/v1alpha1kind: PodMonitor CRD,as documented here

但是,the UI says “云监控无法在 Autopilot 集群中进行编辑。”gcloud container clusters update my-cluster --monitoring=WORKLOAD 表示 ERROR: (gcloud.container.clusters.update) Must include system monitoring if any monitoring is enabled. 但与 --monitoring=SYSTEM,WORKLOAD 相同表示 ERROR: (gcloud.container.clusters.update) INVALID_ARGUMENT: Request contains an invalid argument.

您如何在 Autopilot 集群中使用工作负载监控?

【问题讨论】:

    标签: google-kubernetes-engine google-cloud-monitoring


    【解决方案1】:

    目前的诀窍是不要使用 Web 控制台 UI,而是使用带有 gcloud beta 的 CLI, as documented here: “注意:GKE 工作负载指标目前是预览版,因此请务必使用 gcloud beta 命令。”

    另请注意,“GKE 工作负载指标需要 GKE 控制平面版本 1.20.8-gke.2100 或更高版本”as documented here.

    【讨论】:

      猜你喜欢
      • 2022-12-07
      • 2019-09-04
      • 2019-12-09
      • 2020-03-24
      • 2021-04-13
      • 1970-01-01
      • 2021-06-15
      • 2021-09-05
      • 2016-10-09
      相关资源
      最近更新 更多