Adding permissions to a project

7/3/2016

I am trying to follow this tutorial https://tensorflow.github.io/serving/serving_inception

But I see this

$ gcloud container clusters create inception-serving-cluster --num-nodes 5
ERROR: (gcloud.container.clusters.create) ResponseError: code=403, message=Required "container.clusters.create" permission for "projects/tensorflow-serving".

I did not see an option to add permissions to the project anywhere. How do I do this using the CLI or the UI?

EDIT: I do have the project created enter image description here

EDIT: Just saw that it works fine from the cloud shell

-- Abhishek Chanda
google-compute-engine
google-kubernetes-engine

3 Answers

4/7/2019

(Tested on 2019.04.07)

  1. Firstly, check the list of auth accounts:

    gcloud auth list
  2. Next set the active account:

    gcloud config set account <email_address_from_above_output>
  3. Then, specify the parameter for create cluster commamd:

    gcloud container clusters create <cluster_name> --num-nodes=2 --project=<PROJECT_ID>
    
    e.g.
    gcloud container clusters create prod-myapp-cluster --num-nodes=2 --project=myapp-20394823094

    Expected output:

    kubeconfig entry generated for prod-myapp-cluster.
    NAME                LOCATION       MASTER_VERSION  MASTER_IP       MACHINE_TYPE   NODE_VERSION   NUM_NODES  STATUS
    prod-myapp-cluster  asia-south1-a  1.11.7-gke.12   35.5xx.2xx.1xx  n1-standard-1  1.11.7-gke.12  2          RUNNING
-- rc.adhikari
Source: StackOverflow

1/9/2020
  1. Get your project name or create a project if you have created on already at console.cloud.google.com

  2. Enable Kubernetes engine API on the console

  3. run this code on your command prompt

gcloud container clusters create bd-serving-cluster --num-nodes 5 -project=tensorflow-serving-264611 \
--zone=us-central1-f
  1. replace 'bd' with the name of your serving cluster and 'tensorflow-serving-264611' with the project name you created in step 1 and you can choose your preferred zone or use the default 'us-central1-f'
-- babatunde adewole
Source: StackOverflow

7/4/2016

Update: Your project's name is tensorflow-serving-1360, so you should be running gcloud container clusters create inception-serving-cluster --num-nodes 5 --project=tensorflow-serving-1360.


The project tensorflow-serving is not owned by you. It is the example project name used in the linked tutorial, but you need to replace it with the name of your own project as described in the line at the beginning of Part 2:

Here we assume you have created and logged in a gcloud project named tensorflow-serving

-- Robert Bailey
Source: StackOverflow