Member-only story

Multi-master Kubernetes Cluster on GCP using Kubespray

Vinayak Pandey
1 min readAug 17, 2020

In this post, we’ll see how to setup multi-master/HA Kubernetes cluster on GCP using Kubespray.

Pre-requisite: You must have Google Cloud console access.

Step 1: Open Cloud Shell and create a project(if not already created.)

Step 2: Download https://raw.githubusercontent.com/vinycoolguy2015/awslambda/master/script/gcp/host_entries.sh and https://raw.githubusercontent.com/vinycoolguy2015/awslambda/master/script/gcp/Makefile

Step 3: Open Makefile and set project name.

Step 4: Execute make create-kubernetes-cluster command from cloud shell. This will create 2 master servers and 3 worker nodes for our Kubernetes cluster.

It will take approx 15 minutes for cluster setup process to complete. Once setup is completed, you can ssh into one of the maser nodes, you can execute following commands to list your cluster’s nodes.

sudo su -
kubectl get nodes

Next Step: Now when we have our multi-master cluster ready, we can create a load balancer for them so that we can access our cluster even if one of the master goes out of service.

--

--

Vinayak Pandey
Vinayak Pandey

Written by Vinayak Pandey

Experienced Cloud Engineer with a knack of automation. Linkedin profile: https://www.linkedin.com/in/vinayakpandeyit/

No responses yet