sca*_*cai 25 google-cloud-platform google-kubernetes-engine
从GCE的VM中,我做了以下操作
gcloud auth activate-service-account --key-file <blah>
# "blah" is a service account key file (JSON) I generated from the web interface
gcloud config set project <project-name>
gcloud config set compute/zone <zone-name>
gcloud set container/cluster <cluster-name>
Run Code Online (Sandbox Code Playgroud)
然后,当我试图跑
gcloud container clusters get-credentials <cluster-name>
Run Code Online (Sandbox Code Playgroud)
它失败并显示错误消息:
错误消息:"错误:(gcloud.container.clusters.get-credentials)ResponseError:code = 403,message = Request的身份验证范围不足."
VM与GKE集群位于同一网络中.我使用来自GCE外部的计算机的相同服务帐户密钥文件,针对"默认"网络上的GKE集群尝试了同样的事情,并且它成功...
Rob*_*ley 34
要从GCE虚拟机使用Google Kubernetes Engine API,您需要在创建虚拟机时将其添加到VM 平台范围(" https://www.googleapis.com/auth/cloud-platform ").
归档时间: |
|
查看次数: |
19930 次 |
最近记录: |