<p>I am learning GCP and wanted to create a Kubernetes cluster with instance, here is what I did and what I followed with no success:</p>

<p>First set the region to my default <strong>us-east1-b</strong>:</p>

<pre><code>xenonxie@cloudshell:~ (rock-perception-263016)$ gcloud config set compute/region us-east1-b
Updated property [compute/region].
</code></pre>

<p>Now proceed to create it:</p>

<pre><code>xenonxie@cloudshell:~ (rock-perception-263016)$ gcloud container clusters create my-first-cluster --num-nodes 1
</code></pre>

<blockquote>
  <p>ERROR: (gcloud.container.clusters.create) One of [--zone, --region]
  must be supplied: Please specify location.</p>
</blockquote>

<p>So it seems default region/zone <strong>us-east1-b</strong> is NOT picked up</p>

<p>I then run the same command again with region specified explicitly:</p>

<pre><code>xenonxie@cloudshell:~ (rock-perception-263016)$ gcloud container clusters create my-first-cluster --num-nodes 1 --zone us-east1-b
</code></pre>

<blockquote>
  <p>WARNING: Currently VPC-native is not the default mode during cluster
  creation. In the future, this will become the default mode and can be
  disabled using <code>--no-enable-ip-alias</code> flag. Use
  <code>--[no-]enable-ip-alias</code> flag to suppress this warning. WARNING: Newly
  created clusters and node-pools will have node auto-upgrade enabled by
  default. This can be disabled using the <code>--no-enable-autoupgrade</code>
  flag. WARNING: Starting in 1.12, default node pools in new clusters
  will have their legacy Compute Engine instance metadata endpoints
  disabled by default. To create a cluster with legacy instance metadata
  endpoints disabled in the default node pool,run <code>clusters create</code> with
  the flag <code>--metadata disable-legacy-endpoints=true</code>. WARNING: Your Pod
  address range (<code>--cluster-ipv4-cidr</code>) can accommodate at most 1008
  node(s). This will enable the autorepair feature for nodes. Please see
  <a href="https://cloud.google.com/kubernetes-engine/docs/node-auto-repair" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/node-auto-repair</a> for
  more information on node autorepairs. ERROR:
  (gcloud.container.clusters.create) ResponseError: code=403,
  message=Kubernetes Engine API is not enabled for this project. Please
  ensure it is enabled in Google Cloud Console and try again: visit
  <a href="https://console.cloud.google.com/apis/api/container.googleapis.com/overview?project=rock-perception-263016" rel="nofollow noreferrer">https://console.cloud.google.com/apis/api/container.googleapis.com/overview?project=rock-perception-263016</a>
  to do so.</p>
</blockquote>

<p>From the warning/error it seems I need to enable Kubernetes API, and a link is provided to me already, wonderful, I then clicked the link and it took me to enable it, which I did, right after I enabled it, I was prompt to create credential before I can use the API.</p>

<p>Clicking into it and choosing the right API, as you can see from the screenshot, it doesn't give me a button to create the credential:</p>

<p><a href="https://i.stack.imgur.com/SNViK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SNViK.png" alt="enter image description here"></a></p>

<p>What is missing here?</p>

<p>Thank you very much.</p>

mdivk
<p>Once the API is created, you can go ahead and create the cluster. The credentials are not used when you use gcloud since the SDK will wrap the API call and use your logged-in user credentials. </p>

<p>As long as the Kubernetes Engine API shows as enabled, you should be able to run the same command you used and the cluster will be created. Most of those are just warnings letting you know about default settings that you did not specify</p>
