403 “Request had insufficient authentication scopes” during gcloud container cluster get-credentials

后端 未结 4 930
眼角桃花
眼角桃花 2020-12-29 03:48

From a VM in GCE, I did the following

gcloud auth activate-service-account --key-file 
# \"blah\" is a service account key file (JSON) I generate         


        
4条回答
  •  悲&欢浪女
    2020-12-29 04:31

    If you are using The Google Kubernetes Engine API from a VM in GCP. You first need to add required scope at vm level https://www.googleapis.com/auth/projecthosting,cloud-platform. This can be done by GCP console as well. Stop the VM instance then go to edit option and at the end you will find Cloud API access scopes.

提交回复
热议问题