Skip to content
Hands-on IT IT Drills

Foreword

GitOps is quick to explain: the desired state lives in Git, and a program in the cluster makes sure it stays that way. Flux is one of the two big programs for this, a CNCF project that has been in use for years, from the lab to fleets with hundreds of clusters.

This book does not explain Flux from the outside. You build it up, day by day, and make the mistakes that happen in operations along the way. Every output in this book comes from a real run, and some chapters show what went wrong during testing: the namespace that disappears during a move, the encrypted password that lands in the cluster as plain text, the tenant who becomes cluster admin.

Who this book is for

For everyone who knows Kubernetes and no longer wants to roll out applications with kubectl apply or a pipeline: developers, operations teams, platform teams. You should know pods, deployments, services and namespaces and be able to use a shell. You should use Git every day: commit, push, merge. You do not need to master Helm and Kustomize; the book shows what you need.

How the book is structured

16 training days, each with the same structure:

  • Goal and Briefing: what it is about, in a few paragraphs.
  • Drills: step by step, every command with the expected output.
  • Checkpoint: individual commands that show whether you have reached the goal.
  • Challenge: a task with a hint and a solution.
  • Enterprise Note: what is different in operations than in the lab.

The days build on each other. Days 0 to 2 lay the foundation, days 3 to 8 are the everyday work with sources, Kustomizations, Helm and Secrets. Days 9 to 13 bring automation, notifications, tenants, CI and operations. Day 14 connects Flux with kro, and Day 15 is a competition made of five real incidents. At the end there is a cheat sheet and a final exam.

What you need

  • A Linux VM with 2 CPUs, 4 GB RAM and internet access. Day 0 shows the way with Multipass.
  • An account on github.com. Flux creates a private repo there.
  • About 20 hours, spread over as many days as you like.

Versions

Tested with k3s 1.37.2, Flux 2.10.0, Helm 4.3.1, SOPS 3.13.3, age 1.3.2, kro 0.10.0 and notes-api 0.5 to 0.7. Older or newer versions usually behave the same, but the output may differ. When in doubt, --help and the documentation at fluxcd.io/flux will help.

Companion code

All solutions are on GitHub: github.com/thomaszachmann/flux-zum-anfassen. In loesung/tagNN you will find the state of the fleet repo at the end of each day, in wettkampf/ the files for Day 15.

Enjoy your drills.

Thomas Zachmann