2

I have a gcp service account with kubernetes engine admin role, I get an error trying to create new cluster. Any ideas?

gcloud auth activate-service-account --key-file service_account.json
gcloud config set project my_proj_name
gcloud container clusters create dummy  --num-nodes=3  -m n1-standard-8 --zone europe-west1-b

ERROR: (gcloud.container.clusters.create) ResponseError: code=400, message=The user does not have access to service account "default".

.

Mika R
  • 105
  • 1
  • 7
  • This looks like a duplicate of this question: https://stackoverflow.com/questions/40367866/gcloud-the-user-does-not-have-access-to-service-account-default – Vilas Jan 24 '18 at 19:30

3 Answers3

4

Issue solved after setting the service account role to the 'Editor' since kubernetes Engine Admin was not sufficient to create new cluster.

Mika R
  • 105
  • 1
  • 7
1

Seems your user does not have access to the service account or service account does not have the right role. You can check service account user role to your user and give Editor, compute admin and service account actor roles.

D Saini
  • 187
  • 7
0

gcloud container clusters create demo-cluster --num-nodes=2 --subnetwork=default use this

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 31 '23 at 20:02