Creating a GKE Cluster with GitHub Actions

Pavan Kumar
Nerd For Tech
Published in
5 min readDec 25, 2020

--

Automating Kubernetes Cluster creation and Bootstrapping using GitHub Actions

GitHub Actions allows you to design your CI and CD workflows directly in your GitHub repositories. GitHub actions are entirely integrated with GitHub. Build, Test, and Deploy can be done directly from GitHub. So your CI/CD workflows can be at the same place where your source code exists. The CI/CD Pipeline can be triggered with events like pull requests or merging of branches etc. In this article, we will be using the GitHub actions to create a GKE Cluster with terraform and bootstrap the cluster with some tools like Istio and flagger.

What is the entire story all about? (TLDR)

  1. GitHub Actions allows you to design your CI and CD workflows directly in your GitHub repositories. Build, Test, and Deploy can be done directly from GitHub.
  2. We will create a GKE Cluster ( Using terraform ) with GitHub actions and bootstrap the cluster by installing components like Istio, Flagger, etc.

Prerequisites

  1. GCP Account
  2. GitHub Account
  3. Any remote backend to store your state ( Optional )

DEMO

In this demo, we are going to provision a GKE cluster first and then add a set of Preemptible nodes to the same provisioned cluster.

--

--

Pavan Kumar
Nerd For Tech

Senior Cloud DevOps Engineer || CKA | CKS | CSA | CRO | AWS | ISTIO | AZURE | GCP | DEVOPS Linkedin: https://www.linkedin.com/in/pavanakumar18/