I am trying to create a cluster with GKE. I have a project I have been using already.
When I run
gcloud container clusters create cluster1
I get the following:
ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Google Compute Engine: Required 'compute.networks.get' permission for 'projects//global/networks/default'.
The same thing happens when I use the web UI. Both my service account and my user have owner roles.
I have tried the following to get the cluster create command to work:
- I tried adding a policy binding for the project for my existing service account:
gcloud projects add-iam-policy-binding <my-project> \
--member serviceAccount:<my-user>@<my-project>.iam.gserviceaccount.com \
--role roles/compute.admin
- I read enabling the container api service was required
gcloud services enable container.googleapis.com
- Started over. I deleted the service account, created a new one and activated the creds with:
gcloud auth activate-service-account <my-user>@<my-project>.iam.gserviceaccount.com --key-file ${GOOGLE_APPLICATION_CREDENTIALS}
- I also tried authenticating with my account user:
gcloud auth login
None of these work and I can't create a cluster
gcloud auth login
uses your user credentials ([email protected]). 3) You need bothroles/compute.admin
androles/container.admin
– John Hanley