Google Cloud (GCP) 设置多集群入口 - gcloud 命令错误“gcloud alpha container hub ingress enable \ --config-membership”

问题描述

我正在尝试按照 documentation page 中的步骤在 GCP 中设置多集群 Ingress。

当我尝试使用以下命令设置配置集群时,出现错误 -

$ gcloud alpha container hub ingress enable \
       --config-membership=projects/myproject/locations/global/memberships/gke-us

错误:(gcloud.alpha.container.hub.ingress.enable) INVALID_ARGUMENT:字段 config_membership 的 InvalidValueError: 会员资格 “projects/myproject/locations/global/memberships/projects/myproject/locations/global/memberships/gke-us” 不存在

当我运行 kubectl config get-contexts 时,我可以看到 gke-us 存在。

> $ gcloud container hub memberships list.      
NAME    EXTERNAL_ID
> gke-us  2b7924f5-c55e-485f-959b-9048b0920713 
> gke-eu  9ed69091-56b7-44c0-af49-2ccf817c5fcf

我之前做过几次这个设置,从来没有遇到过这个问题,但突然就开始出现了。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)