google container cluster giving auth error while creation

10/15/2018

Below is the error coming while creating a cluster:

(gcloud.container.clusters.create) ResponseError: code=403, message=Request had insufficient authentication scopes

-- Gaurav Chatrath
authentication
google-kubernetes-engine
kubernetes

1 Answer

10/15/2018

Check the IAM roles for the "Compute Engine default service account" and make sure it has enough permission to run the command [2]. Usually it would have an owner or editor role.

If you are on the Google Cloud Console, when creating an instance you need to look for the 'Identity and API access' section, and select 'Allow full access to all Cloud APIs' [1]

[1]https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances?hl=en_US&_ga=2.168486115.-390700867.1538154355 [2]https://cloud.google.com/iam/docs/granting-roles-to-service-accounts

-- Germán A.
Source: StackOverflow