Skip to content

GitOps

Context

As we now have a GKE cluster, we needed to find a way to deploy our custom applications in to the cluster.

Before implementing this, I built out a system of skaffold (really cool tech) files that allowed devs to run task upgrade -- dev and under the hood would run skaffold -p dev deploy after configuring their kubectl context - This worked well. Allowed for the values to be stored in git, but the only issue was it required users to run it locally and be on the Kubernetes VPN.

Technology used

Flux GitHub Kubernetes

Project Breakdown

Identify the need for GitOps

This was simple. If the cluster goes down, we had no way of knowing what apps were managed in the cluster as the deployments folder was full of old disused applications.

By using GitOps, if the cluster was to get nuked (something that happened to my personal cluster) all we would have to do is run the flux install command, and wait about 30 minutes, and we're good to go!

What I did

  • Find a suitable system to use
  • Move the helm chart storage location
  • Configure Flux on our repo
  • Custom designed a Flux Google Artifact Registry credential helper (that I will opensource soon)
  • Set up the repo to receive notifications from Flux on successful deploy