Appendix A: Cheat Sheet
Everything at a glance, sorted by topic.
Addresses in the lab
| What | Where |
|---|---|
notes (prod, namespace notes) |
http://<VM-IP>:30080 |
notes (dev, namespace notes-dev) |
http://<VM-IP>:30081 |
| notes-helm | http://<VM-IP>:30090 |
| Team blau (Deployment, NotesApp) | :30092, :30094 |
| Team grün (NotesApp) | :30095 |
| Registry in the cluster | localhost:30500 (VM),
registry.registry.svc.cluster.local:5000 (cluster) |
| Receiver | http://<VM-IP>:30900/hook/… |
| Keys and tokens | ~/flux-lab/age-2027.agekey,
~/flux-lab/webhook.token, ~/.github-token |
Installation and upgrade
flux check --pre
flux bootstrap github --owner=$GITHUB_USER --repository=flux-fleet \
--branch=main --path=clusters/lab --personal --private=true \
--components-extra=image-reflector-controller,image-automation-controller \
--read-write-key
flux check
flux uninstall --dry-run --silent- Upgrade: install the new CLI, run the same
bootstrapagain. - Regenerate the deploy key:
kubectl -n flux-system delete secret flux-system, thenbootstrap. - Patches in
clusters/<name>/flux-system/kustomization.yamlsurvive every bootstrap.
Creating objects
Always with --export > datei.yaml, so that Git
remains the source of truth.
flux create source git NAME --url=… --tag-semver="6.x" --export
flux create source oci NAME --url=oci://… --tag-semver="0.x" [--insecure] \
[--layer-selector=application/vnd.cncf.helm.chart.content.v1.tar+gzip:copy] --export
flux create source helm NAME --url=https://… --export
flux create kustomization NAME --source=GitRepository/flux-system --path=./… \
--prune=true --interval=10m [--wait=true --timeout=2m] [--depends-on=X] \
[--target-namespace=NS] [--service-account=SA] --export
flux create helmrelease NAME --chart-ref=OCIRepository/X.NS --values=werte.yaml --export
flux create helmrelease NAME --source=HelmRepository/X --chart=C --chart-version="1.x" --export
flux create image repository NAME --image=ghcr.io/… --export
flux create image policy NAME --image-ref=X --select-semver=">=1.0.0" --export
flux create image update NAME --git-repo-ref=flux-system --git-repo-path=./clusters/lab \
--checkout-branch=main --push-branch=main --author-name=… --author-email=… --export
flux create alert-provider NAME --type=generic|github|slack --address=… --export
flux create alert NAME --provider-ref=X --event-severity=info|error \
--event-source="Kustomization/*" --export
flux create receiver NAME --type=github --event=push --secret-ref=X \
--resource=GitRepository/flux-system --export
flux create tenant NAME --with-namespace=NAME --exportInspecting and troubleshooting
flux get all -A
flux get all -A --status-selector ready=false
flux get kustomizations | helmreleases | sources all | image policy
flux events --for Kustomization/NAME
flux logs --kind=Kustomization --name=NAME --since=10m
flux trace deployment NAME -n NS
flux tree kustomization NAME
flux stats -A
flux build kustomization NAME --path ./…
flux diff kustomization NAME --path ./… --kustomization-file clusters/lab/NAME.yaml
flux reconcile kustomization NAME --with-source
flux suspend | resume kustomization NAMEImportant fields
| Object | Field | Effect | Day |
|---|---|---|---|
| Kustomization | prune |
remove what was deleted from Git | 2 |
| Kustomization | wait, timeout |
ready only when the objects are ready | 4 |
| Kustomization | dependsOn |
ordering | 4 |
| Kustomization | postBuild.substitute(From) |
variables ${X}, ${X:=std} |
4 |
| Kustomization | targetNamespace |
set the namespace | 3 |
| Kustomization | decryption |
decrypt SOPS | 8 |
| Kustomization | serviceAccountName |
apply as this ServiceAccount | 12 |
| GitRepository | ignore |
fetch only parts | 3 |
| HelmRelease | valuesFrom |
values from ConfigMap/Secret | 6 |
| HelmRelease | driftDetection.mode |
enabled or warn |
6, 7 |
| HelmRelease | upgrade.remediation |
roll back | 7 |
| HelmRelease | test.enable |
Helm tests | 7 |
| ImageRepository | exclusionList |
ignore tags during the scan | 9 |
| Object in the cluster | kustomize.toolkit.fluxcd.io/prune: disabled |
never prune | 4 |
| ConfigMap | reconcile.fluxcd.io/watch: Enabled |
pick up changes immediately | 5 |
Messages and what they mean
| Message | Cause | Day |
|---|---|---|
Write access to repository not granted |
token without Contents | 1 |
GET …/keys: 403 |
token without Administration | 1 |
refusing to allow a Personal Access Token to create or update workflow |
token without Workflows | 13 |
dry-run failed … expected numeric … got string |
type error in the manifest | 2 |
health check failed after 2m0s: timeout waiting for |
pods do not become ready | 4 |
dependency '…' revision is not up to date |
dependency not finished yet | 4 |
variable not set (strict mode) |
variable missing | 4 |
configmaps "…" not found (HelmRelease) |
hash name without nameReference |
6 |
RetriesExceeded (Stalled) |
remediation gave up, new chart needed | 7 |
ENC[AES256_GCM,… in the cluster Secret |
decryption missing |
8, 15 |
Failed to get the data key |
wrong age key | 8 |
repository up-to-date despite a difference |
old push branch | 10, 15 |
payload signature check failed |
newline in the token | 11, 15 |
User "system:serviceaccount:…:default" cannot … |
serviceAccountName missing (lockdown) |
12, 14, 15 |
Kustomization object '…' not found |
file missing under resources |
14, 15 |
Orderings
- Introducing SOPS: first add
decryptionto the Kustomization, then encrypt. - Moving an object between Kustomizations: first set
prune: disabledand apply it, then move. - Rotating the age key: new key into the cluster
Secret (both),
updatekeys, push, remove the old key. - Lockdown: first give every platform object a ServiceAccount, then set the controller options.
- Platform APIs: tool (
kro) → API (kro-apis) → tenants (tenants).