Launching your first GKE cluster
As it is going to take a few minutes to launch the cluster, let's run the command to initiate the process and then talk through in a little more detail what is happening while it launches.
Before we launch our cluster, we need to make sure that the container.googleapis.com
service is enabled. To do this, run the following command:
$ gcloud services enable container.googleapis.com
Once the service has been enabled, the command to launch a two-node cluster called k8sforbeginners
, which will be hosted in a single zone in the Central US region, is as follows:
$ gcloud container clusters create k8sforbeginners --num-nodes=2 --zone=us-central1-a
After about 5 minutes, you should see something that looks like the following output:
Once the cluster has launched, you should be able to follow the URL in the output and view it in Google Cloud Console, as seen in the following...