gcp container cluster initialization failed

6/13/2017
 ~ gcloud container clusters create example-cluster
ERROR: (gcloud.container.clusters.create) ResponseError: code=403, 
message=Google Compute Engine: Required 'compute.zones.get' permission 
for 'projects/saleop-166407/zones/asia-northeast1-a'

This is the shell script I used to start a container cluster. I failed with web console(using UI), gcloud sdk cli and google cloud shell. It is saying something about permission, but I couldn't find any change I made.

So I created a new project and did the same thing then It worked. What is the problem?

-- sokancho
google-cloud-platform
google-kubernetes-engine

1 Answer

6/14/2017

Did you change the roles of your Compute Engine default service account in Console --> IAM/Admin --> IAM section, or for other accounts? It looks like your Compute account cannot use the compute API. enter image description here

Make sure your Compute Engine default service account has "Editor" role on your project.

That's the only explanation I can think of, because when you create a new project, that project gets a brand new Compute Engine service account with correct permissions.

-- AhmetB - Google
Source: StackOverflow