Deploy Kubernetes cluster to Google Cloud Platform (GCP)

In this blog post, I will show you how to deploy a Kubernetes cluster to Google Cloud Platform (GCP).

Google Kubernetes Service (GKE)

GCP flagship Kubernetes service is called GKE, and it allows us to deploy a managed Kubernetes cluster inside GCP infrastructure.

Our management domain in the Cluster allows us to deploy, workloads, nodes, storage and pods.

Google’s management domain involves managing the underlying infrastructure, and the Kubernetes master nodes also are known as a control plane.

About Kubernetes

I will go into too many details about Kubernetes. However, I will point out that it is the leading open-source container orchestration system and currently hold 80% of the market and growing fast.

Deploy GKE Cluster

When it comes to deployment, GCP gives two deployment options, the first is using the GCP management console, and the second is using gcloud command-line utility which I will show you in the next article.

Create a new project

Let’s start with creating a new GCP project by click on the projects drop-down menu and click on New project.

Name the project and click create

After the project has been created, open it from the drop-down project list as shown below.

To create our GKE cluster, open the left navigation menu locate the Kubernetes Engine link and click on Cluster.

Note: you can also use the search bar at the top to search for services.

From the cluster basics page, we can name our Cluster, set the zone (datacenter) and specify which version of Kubernetes we would like to use.

Currently, we have the option to select versions between 1.14 and 1.16 in my case I will select the latest.

GCP gives us a lot of configuration options, and you will find them on the left navigation menu, as shown below.

The options are extensive as you can see below and let us configure nodes, scaling, networking settings and many more.

If you are deploying your Cluster for testing purposes, you might want to change the default worker nodes count.

Node Pool

By default, every Cluster comes with three worker nodes which you might not need if you are running test and not using the Cluster for production workloads.

To change the default number of nodes, click on the default-pool menu from the left navigation menu and change the number of nodes under the size section to 1, as shown below.

You can go ahead and click create.

In my next article (link below) I will show you how to manage and deploy workloads to GKE:

How To Deploy Applications To a GKE Kubernetes Cluster

Processing…
Success! You're on the list.


Posted

in

, ,

by