Google Cloud GKE

Step 1: Create a Kubernetes cluster

1) Create a Google Cloud Platform (GCP) account

As a free option, GCP offers a $300 free credit: https://console.cloud.google.com/freetrial

2) Install CLI

Install the SDK CLI tool: https://cloud.google.com/sdk/install

3) Create a Kubernetes cluster (GKE)

To create a new Kubernetes cluster, go to your GCP Console Home Page (https://console.cloud.google.com) and select Kubernetes Engine / Clusters.

Enter the Cluster Name, select the Zone based on your location and I’ve selected 2 vCPUs and left the Size to the default value (3).

Once the cluster is created click on the Connect Button on the right hand side of the table:

This will open a popup with a command to connect to the cluster. Copy it to your clipboard, open a terminal and paste the command into your terminal.

Note: if you are working with an existing cluster, you will need to check if you have an Ingress Controller already installed, you can skip the NGINX Ingress installation (step 2) if that is the case.

Step 2: Configure HELM and install NGINX Ingress

Let's now configure HELM to work in the Cluster. We first need to give HELM permissions to deploy things into the cluster. Download the file below:

Run the following commands in your terminal:

kubectl apply -f helm-service-account-role.yaml
helm init --service-account helm --upgrade

In order to be able to expose our services to be accessed from outside the cluster, we need to set up an Ingress Controller, which will automatically create routes to the internal services that we want to expose. To install the NGINX Ingress controller, run the following command:

helm install stable/nginx-ingress --version 1.5

Now that NGINX Ingress Controller is being deployed, we need to wait for it to expose itself using a Public IP. We need this Public IP to interact with our services from outside the cluster. You can find this IP by running the following command:

kubectl get services

Example output with GCP deployment:

Last updated