【问题标题】:GKE 1.4.5 (master and nodes) on gci cannot access cloud storagegci 上的 GKE 1.4.5(主节点和节点)无法访问云存储
【发布时间】:2016-11-04 00:29:50
【问题描述】:

我正在尝试将我们的 GKE 集群(运行 1.4.5)从 container-vm 迁移到 gci。 我正在使用https://cloud.google.com/container-engine/docs/node-image-migration的迁移指南

当我在 gci 节点上部署时,我无法访问云存储,我使用 google-cloud java 0.5.0 库(与 0.4.0 相同的问题);我得到的错误是权限不足,container-vm节点没有问题。

这是我的集群权限:

User info                  Enabled
Compute                    Read Write
Storage                    Read Write
Task queue                 Enabled
BigQuery                   Enabled
Cloud SQL                  Enabled
Cloud Datastore            Enabled
Stackdriver Logging API    Full
Stackdriver Monitoring API Full
Cloud Platform            Enabled
Bigtable Data             Read Write
Bigtable Admin            Full
Cloud Pub/Sub             Enabled
Service Control           Enabled
Service Management        Read Write
Stackdriver Trace         Disabled
Cloud Source Repositories Disabled

这是我得到的错误:

com.google.cloud.storage.StorageException: Insufficient Permission
at com.google.cloud.storage.spi.DefaultStorageRpc.translate(DefaultStorageRpc.java:202) ~[google-cloud-storage-0.5.0.jar:0.5.0]
at com.google.cloud.storage.spi.DefaultStorageRpc.create(DefaultStorageRpc.java:253) ~[google-cloud-storage-0.5.0.jar:0.5.0]
...
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
    {
       "code" : 403,
       "errors" : [ {
         "domain" : "global",
         "message" : "Insufficient Permission",
         "reason" : "insufficientPermissions"
       } ],
       "message" : "Insufficient Permission"
    }

【问题讨论】:

  • 您如何在代码中验证请求,使用默认 GCE 服务帐户或项目中的其他服务帐户?您还可以确认您的服务帐户是否在项目中设置了适当的权限(编辑者)?
  • 是的,一切都经过身份验证,并获得了适当的许可,同样,这不会发生在 container-vm 映像中,只是 GCI 映像。我收到 GCP 支持人员的答复,说不知何故没有在 GCI 虚拟机上填充权限,我应该进行就地虚拟机更新。考虑到就地更新涉及的风险,我决定选择退出并继续使用该集群的 container-vm。
  • 我已删除我的评论并将其添加为答案。

标签: google-cloud-storage google-kubernetes-engine google-container-os


【解决方案1】:

我相信您已经通过 Web UI(云控制台)创建了新的节点池。如果是这样,这是一个已知的 UI 问题,您无法选择指定新节点池的范围。工程团队已经意识到这一限制,并正在努力修复。话虽如此,如果未指定范围,则将默认范围用于新节点池。解决方法是使用带有 gci 映像类型的 gcloud upgrade 命令升级集群,或者您可以使用 gcloud 创建节点池并为它们提供必要的范围,如 here 所述。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-01-21
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    • 2018-09-12
    • 2022-01-15
    • 2020-09-02
    • 2012-11-21
    相关资源
    最近更新 更多