Google

How to create a kubernetes cluster on the Google Cloud Platform (GCP)?

Using the Google Cloud Console

You can create Kubernetes clusters in a few clicks on the Google Cloud Console.

First make sure you have created/selected a Project:

Now you can click the create cluster button on the kubernetets clusters page or try create cluster.

Using gcloud

The CLI tool for working with google cloud is called gcloud. If you have not done so already please install gcloud.

To create a cluster with gcloud follow these instructions.

Using Google Cloud Shell

To avoid having to install gcloud you can use the Google Cloud Shell as it already comes with most of the things you may need to install (git, gcloud, kubectl etc).

First you need to open the Google Cloud Shell via the button in the toolbar:

You can then create a cluster with gcloud by following these instructions.

Connecting to your cluster

Once you have created a cluster, you need to connect to it so you can access it via the kubectl or jx command line tools.

To do this click on the Connect button on the Kubernetes Engine page in the Google Console.

You should now be able to use the kubectl and jx CLI tools on your laptop to talk to the GKE cluster. e.g. this command should list the nodes in your cluster:

kubectl get node

Last modified December 14, 2019: release 0.0.1346 (dcfae35)