Fleet GitOps: printable course notes
Run a fleet of Kubernetes clusters the way platform teams do: clusters from Terraform, a hub running Argo CD, add-ons and guardrails on every cluster, products onboarded with one file, and every change, production included, through issues, pull requests and approvals.
These pages are the same content as the interactive course, on one page per module, for reading and printing.
Four pieces, one fleet
| Piece | What it is |
|---|---|
| See the end result | Not the first step: create the finished fleet from the template, run terraform apply, watch a product deploy. About 30 minutes, few explanations. Useful to know where you are heading, or as a demo. |
| Full course | Build the same fleet piece by piece, in the order a platform team would, with the reasoning, the workflow and failure drills. |
| Reference repo | The completed implementation. You copy folders from it, one pull request per module, and compare against it at the end. |
| Your repo | The repo you operate and Argo CD watches. Starts empty in the course; created from the template in the end-result preview. |
Your setup
Commands in these notes use these values (shared with the interactive course, stored only in this browser).
Outline
| Module | Part | Time | You are | You will |
|---|---|---|---|---|
| 00 Orientation: the platform you will run | Orientation | 20 min | Platform and product | Know the scenario, who owns what, how a change travels, and the four pieces of this course. Tell the course who you are so every command is yours. |
| 01 Your fleet repo and the change workflow | Platform foundation | 45 min | Platform team | Create your fleet repo with CI, issue forms and review rules in place before anything else, then make your first change through the whole journey: an issue, a pull request, validation, a merge. |
| 02 Clusters as code with Terraform | Platform foundation | 45 min | Platform team | Provision the hub and the workload clusters declaratively, install Argo CD and register the clusters with labels from the inventory, all from one reviewed Terraform change. |
| 03 Hand the fleet over to Git | Platform foundation | 40 min | Platform team | Add the root Application so Argo CD manages the fleet from your repo, generate the first Applications per cluster, and watch Argo CD undo a manual change. |
| 04 Platform add-ons on every cluster | Platform foundation | 40 min | Platform team | Install the same pinned set of add-ons (ingress, certificates, secrets, metrics, policy engine, rollouts) on every cluster with one matrix ApplicationSet, and see a new cluster get them for free. |
| 05 Guardrails and the namespace baseline | Platform foundation | 45 min | Platform team | Ship the policies that protect the platform and the chart that gives every product the same namespace baseline: quota, limits, network policy, RBAC, Pod Security, ownership and cost labels. |
| 06 Onboard a product, declaratively | Product self-service | 60 min | Product team | As team-checkout, request a product, propose one product.yaml and your deployment config, and get an AppProject, a namespace baseline and an Application per environment without touching a cluster. |
| 07 Ship, promote and roll back | Product self-service | 50 min | Product team | Ship a change to dev with no approval, promote a version to prod through the production gate, trace both to the clusters, and roll back with a revert. |
| 08 Operate the fleet: failure drills | Operate and grow | 60 min | Platform and product | Run five realistic failures and, for each, answer: what failed, how it was detected, who responds, how it is corrected, and how the platform prevents it next time. |
| 09 Observability and change visibility | Operate and grow | 40 min | Platform and product | Ship logs from every cluster to Loki and Grafana on the hub, declaratively, and connect what is running to the change that put it there. |
| 10 Secrets and identity | Operate and grow | 45 min | Platform and product | Give products secrets without putting secrets in Git, and replace shared passwords with identities: External Secrets per namespace, SSO and per-team access in Argo CD. |
| 11 Going to cloud, and splitting the repo | Operate and grow | 60 min | Platform team | Know how the same fleet runs on AKS, EKS, GKE or existing clusters, and when and how to split the single repo into infrastructure, platform and product repositories. |
| 12 Reference architecture and the road to production | Operate and grow | 30 min | Platform and product | Connect every exercise into one architecture, compare your repo with the reference, and leave with a prioritised production checklist. |
The change journey
- Requested: GitHub issue from a form
- Proposed: Pull request, Closes #issue
- Validated: validate check
- Previewed: plan comment: Applications added/removed
- Approved: Code owners; prod: environment approval
- Merged: Commit on main, deployment record
- Reconciled: Argo CD syncs the commit
- Healthy: Synced and Healthy on every cluster
Where clusters run
kind on your laptop is the default for every module. On AKS, EKS or GKE only module 02 differs (scripts in infrastructure/cloud/ instead of Terraform); module 11 covers the Terraform route for clouds.
Between you and real production
- Separate repositories: infrastructure-live, platform-fleet and one deployment repo per team, split along ownership.
- Terraform in CI: Remote state with locking, plan on the pull request, apply from CI with OIDC.
- HA Argo CD with SSO: values-prod.yaml, the admin user disabled, groups mapped to per-product roles.
- Workload identity per spoke: No admin certificates or long-lived tokens in cluster Secrets.
- Branch protection everywhere: Required checks, code owner review, no bypass for prod paths.
- Production approvals: The production environment with required reviewers who are not the author.
- Secrets from a vault: External Secrets with workload identity; push protection on.
- Policies enforced: Kyverno Enforce in prod, exceptions only through reviewed pull requests.
- Change visibility: Argo CD Notifications updating GitHub deployments and team channels.
- Alerting on absence: No logs, no sync, cluster unreachable: alerts per cluster.
- Upgrade cadence: Kubernetes and add-ons wave by wave on a schedule; Renovate reviewed weekly.
- Hub rebuild rehearsed: Drill 5 on a schedule, with a timer.