You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何解决GKE Autopilot集群关闭日志监控时的404错误?

解决GKE Autopilot集群日志监控关闭失败的问题

问题根源

  • 你指定了可用区us-central1-c,但GKE Autopilot集群属于区域级资源(绑定区域如us-central1,而非具体可用区),导致系统找不到目标集群。
  • 命令中使用的--logging-service和--monitoring-service参数已废弃,需替换为新的参数格式。

修复步骤

  1. 确认集群的正确区域
    先执行命令获取集群的准确区域信息:

    gcloud container clusters list --project my-project
    

    输出结果里会明确显示my-cluster对应的区域(比如us-central1)。

  2. 执行正确的更新命令
    使用区域参数替换可用区参数,同时改用新的日志/监控参数:

    gcloud beta container clusters update my-cluster --region us-central1 --logging none --monitoring none
    

    (注:若你的集群确实是可用区级部署,可将--region替换为--zone,但Autopilot集群默认均为区域级)

  3. 验证配置是否生效
    执行以下命令检查日志和监控状态:

    gcloud container clusters describe my-cluster --region us-central1 | grep -E 'loggingService|monitoringService'
    

    若输出显示loggingService: none和monitoringService: none,则说明配置已成功生效。

内容的提问来源于stack exchange,提问作者alonana

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 20:36:38