Creating a Kubernetes Cluster with Google Kubernetes Engine (GKE) under 5 minutes !!!

Google Kubernetes Engine (GKE) or formally known as Google Container Engine was the first Public Cloud provider to get certified under Cloud Native Computing Foundation (CNCF) certified provider program. List of other providers can be found in https://kubernetes.io/partners/.

In this example I am going to be using Google Cloud Console, which I assume you all are familiar with.

Pre-requisites:
- You already have a Google Account and have access to Google Cloud Console (https://console.cloud.google.com)
- Billing account enabled that can be use in this project

Please note if you are creating a brand new Google Cloud account while a new billing account and a valid credit card is required you can pretty much do this with the generous USD$300 credit you receive from Google).

If you use an existing account you may be charged few dollars depending on how long you keep the cluster running.

Step 1: Create a Google Cloud Project OR select and existing Project
In this example I am going to create a new project, however you can select and existing project as far as you have a valid billing account available. The following screenshot depicts the creation of a new project.

Create a new Google Cloud Project

Once the project is created your Google Cloud Console Home page should look something similar to this (Google have been making lot of changes in their console, therefore this is at the time on writing on 30th Dec 2017)

After Creating the new Project — Home Dashboard

Step 2: Create a Kubernetes Cluster
Now that you have a project created, you can head to creating a Cluster of your choice. To do this select Kubernetes Engine menu item from the left side navigation. It make take a minute or two to setup the Kubernetes Engine for the first time. The following screenshot depicts the home screen for Kubernetes Engine.

Kubernetes Engine Home Screen

Select Create Cluster to create your first Kubernetes Cluster.

In this example as you can see I have given a name which is mandatory, and only other changes I have applied are selecting the Cluster Version, Zone anda Machine Type. They are highlighted in the screenshot below. However there is nothing stopping you go with the default values.

Important thing to note is that you are billed for the number of cluster nodes you add. In my case I will be billed for three (3) nodes.

Adding Cluster Info

After one to two minutes you should see your cluster is created and ready to use.

Your Cluster is now Ready to Use

Yes it is that simple to create a Kubernetes Cluster in GKE.

Step 3: Deploy an App in your Cluster
Given my colleague Binura Gunasekara has a written an article on how to deploy an app in your cluster I will be referring you to his article.

Step 4: Clean Up
Once you have deployed an app in the cluster and played a bit with the Cluster you can delete the cluster as simple as selecting the select button on the cluster screen.
Also if you are not going to be using the project again, it is also good practice to delete the project too. You can do this by going to the project setting and selecting SHUT DOWN.

Hope you enjoyed creation of your first Kubernetes Cluster under five (5) minutes !!!

--

--

Kanchana Wickremasinghe
Platformer — A WSO2 Company

Husband, dad of two + 2 dogs, cook, Open Source Advocate and Co-founder of Platformer Cloud Pty Ltd (www.platformer.com — acquired by WSO2) living in Melbourne.