Scopes required for executing "gcloud container clusters create" on GCE VM instance

10/2/2016

I am trying to create a GKE cluster by executing the following command on a GCE VM instance:

sudo gcloud container clusters create my-cluster \
  --machine-type g1-small --num-nodes 1

Execution fails with this error message (despite kubectl being installed):

WARNING: Accessing a Container Engine cluster requires the kubernetes commandline client [kubectl].
ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Request had insufficient authentication scopes.

This problem is perhaps cause by the VM instance not possessing enough scopes. It currently possesses the following ones. Which other scope(s) is required in order for the problem to disappear?

enter image description here

-- Drux
google-compute-engine
google-kubernetes-engine

1 Answer

10/3/2016

Google Container Engine requires the https://www.googleapis.com/auth/cloud-platform scope, so you'll need to select "Allow full access to all Cloud APIs" when you create the VM instance.

-- CJ Cullen
Source: StackOverflow