Skip to content

ywarezk/academeez-k8s-flux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced K8S management using Flux

This Repo is meant to be a starter kit for managing organizations mono repository that contains

  • IAC (Terraform/OpenTofu)
  • Terragrunt
  • Managed K8S
  • FluxCD

The starter kit is opinionated to some degree. We do focus on best practice so the aim here is to create a kit that can for the basis of managing large projects with large teams.

Every aspect of this repo is documented in this academeez course.

In the course we will learn how to manage your K8S cluster in a professional way using Flux.

The course and this repo are completly free and open source (MIT Licensed)

Lessons

Here are the lessons we are going to learn in this course. Clicking the link to the lesson will point you to the lesson article and video lesson.

Things you need to know before we start our journey. Requirements, Prerequisites, etc.

In this lesson we will Install Flux on our K8S cluster

Install flux using cli

When we installed Flux, gitops operators were installed as well. We will go over each of those operators, starting with kustomize-controller which collects manifests and keeps our cluster synced with the state described in those manifests.

kustomize-controller

No more using the helm command to altar our k8s cluster state. Installing helm charts is done in a declarative gitops way using flux helm-controller. In this lesson we will learn about helm-controller by installing our first chart - nginx ingress controller

helm-controller

There are a few advantages of installing Flux using infrastructure as code technology like Terraform.
Especially when you will need to manage more than one cluster.

Installing FluxCD with Terraform/OpenTofu

It's best to split our IAC big project to small mini projects where each one is stored in a seperate state. Unfortunately doing so with Terraform will be hard, but terragrunt which is a small wrapper around Terraform/OpenTofu is perfect for the job.

Introduction to Terragrunt

Repo structure

Since all this course is using the same repo, and we still want you to examine source code for each lesson, therefor each lesson will have a branch created.

For example to see the source code for lesson one go to the branch lesson-01