Skip to content
Hands-on IT IT Drills

Foreword

GitOps sounds like a big concept, but it is a simple rule: what should run in the cluster lives in Git, and a program in the cluster makes sure it stays that way. Nobody runs kubectl apply from their laptop anymore. If you want to change something, you make a commit. Argo CD is the most widely used program for this, with a web UI that shows what is running, what has drifted, and why.

This book starts without Argo CD. On Day 0 you start notes-api by hand and see how quickly nobody knows what is actually running in the cluster. After that, Argo CD takes over step by step: the first Application, sync policies, ordering with hooks, Helm and Kustomize, app of apps, ApplicationSets, projects and permissions, encrypted Secrets, a second cluster, automatic image updates, notifications, canary and blue-green with Argo Rollouts, and finally a real upgrade. notes-api with Postgres runs through the whole book as the common thread.

Every output in this book comes from a real run on two test VMs. Many chapters show what went wrong during testing: the hook that waits for a Secret that does not exist yet, the ApplicationSet that silently takes the database with it when a folder is deleted, or the Image Updater fighting the ApplicationSet over the same field. These passages are marked Tried it.

Who This Book Is For

For platform teams who want to run Kubernetes clusters with Git instead of scripts, for developers who want to know what happens after their merge, and for everyone who already uses Argo CD but has never looked under the hood. You should know Kubernetes basics: Pods, Deployments, Services, Namespaces, and kubectl. You should be able to use Git on the command line. The book does not require any other book in the series. If you know “Flux hands-on”, you will find a comparison on Day 14.

How the Book Is Structured

16 training days, each with the same structure:

  • Goal and Briefing: what it is about, in a few points.
  • 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 production compared to the lab.

Days 0 to 3 lay the foundation: training ground, installation, the first Application, sync policies. Days 4 to 8 are the tools for real applications: hooks, Helm, Kustomize, app of apps, and ApplicationSets. Days 9 to 11 make Argo CD multi-tenant: projects, Secrets, and multiple clusters. Days 12 and 13 automate delivery with Image Updater, Notifications, and Rollouts. Day 14 covers operations and upgrades, Day 15 is a competition made of five incidents. At the end there is a cheat sheet and a final exam.

What You Need

  • Two Linux VMs with Ubuntu 24.04: argo with 4 vCPUs, 8 GB RAM, and 40 GB disk, prod with 2 vCPUs, 4 GB RAM, and 30 GB disk, both on the same network. You only need prod from Day 11 on.
  • Internet access for both.
  • A GitHub account for the fleet repo.
  • About 20 hours, spread over as many days as you like.

Versions

Tested with Ubuntu 24.04, k3s v1.37.2+k3s1, Argo CD 3.5.7 and 3.6.1, Helm 4.3.2, Kustomize 5.8.1 (in Argo CD), Argo CD Image Updater 1.5.0, Argo Rollouts 1.10.2, SOPS 3.13.3, age 1.3.2, and KSOPS 4.5.1. Newer versions usually behave the same, but the outputs may differ. When in doubt, check the documentation at argo-cd.readthedocs.io.

Companion Code

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

Enjoy your drills.

Thomas Zachmann