Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Account does not exists on GCP

While trying for the first time to use Google Kubernetes Cloud solution, and according to the tutorial... I am trying to create new cluster.

But after pressing Create i receive

The request contains invalid arguments: "EXTERNAL: service account 
"****@developer.gserviceaccount.com" does not exist.". Error code: "7"

in a red circle near the Kubernetes cluster name.

After some investigations it's looks like the default service account which google generated for my account.

I've looked over the create cluster options, but there isn't any option to change the service account.

Do I need to change Google Compute Engine default service account? how i can do it?

How I can overcome this issue?

Thank you

like image 535
Ami Hollander Avatar asked Nov 30 '17 11:11

Ami Hollander


Video Answer


2 Answers

Default Compute Engine Service Account is essential for functions related to Compute Engine and is being generated automatically. Kubernetes Engine utilizes Compute Engine VM Instances as Nodes used for the cluster. GKE uses the Compute Engine Service Account to authorize the creation of these nodes.

In order to regenerate default service there are two options:

  1. Regenerate by Disabling and Re-enabling the Google Compute Engine API. In the "API's & Services" dashboard. If for some reason performing this option encountering errors when disabling the API, then try option 2.
  2. run command gcloud services enable compute.googleapis.com in Cloud SDK or Cloud Shell which is in the header of the page.
like image 66
Ami Hollander Avatar answered Nov 15 '22 09:11

Ami Hollander


Looks like you either do not have any default service account or have more than one. Simply go to the "Service Accounts" section "IAM & Admin" and select the app engine default service account, and provide this as an argument while creating cluster from gcloud or gshell as below:

gcloud container clusters create my-cluster --zone=us-west1-b --machine-type=n1-standard-1 --disk-size=100 [email protected]
like image 34
beingmanish Avatar answered Nov 15 '22 11:11

beingmanish