Level 1 — The model · wrap-up
Cheat sheet & self-check
Every command from this section on one page.
See the loop in action (Argo CD / Flux)
argocd app get orders-api | Desired (Git) vs live state, sync and health status |
argocd app diff orders-api | Exactly what differs between Git and the cluster |
flux get kustomizations -A | Flux: which Git paths are applied, and their status |
flux reconcile kustomization apps --with-source | Flux: pull and apply now instead of waiting |
git log --oneline -- environments/prod/ | Every change ever made to production, with author and reason |
Render and check locally
kustomize build apps/orders-api/envs/prod | Exactly what Kustomize will produce for prod |
helm template orders-api charts/orders-api -f envs/prod/values.yaml | Render a chart with prod values |
diff <(kustomize build envs/staging) <(kustomize build envs/prod) | What differs between two environments |
kubeconform -strict -summary rendered/ | Validate rendered manifests against Kubernetes schemas |
Promote by hand (it's just Git)
yq -i '.image.digest = "sha256:..."' apps/orders-api/envs/staging/values.yaml | Set the new digest for staging |
cd apps/orders-api/envs/prod && kustomize edit set image ghcr.io/acme/orders-api@sha256:... | Set the image in a Kustomize overlay |
git switch -c promote/orders-api-prod && git commit -am "orders-api: promote 1.4.0 to prod" | Promotion as a reviewable branch |
gh pr create --title "orders-api 1.4.0 -> prod" --body "Soaked 24h in staging, SLOs green" | Open the promotion PR |
Roll back
git revert <promotion-commit> | Undo a promotion; the agent redeploys the previous version |
git log --oneline -- apps/orders-api/envs/prod/ | Every version prod has run |