Appendix A: Cheat Sheet
Everything at a glance, sorted by topic.
The Lab
| What | Where |
|---|---|
VM argo |
172.16.0.182, k3s with Argo CD, Image Updater, Rollouts |
VM prod |
172.16.0.123, k3s without Argo CD, from Day 11 |
| Web UI | https://172.16.0.182:30443, admin /
lab-argo-pw-123 |
| User alice | lab-alice-pw-123, role notes-entwickler
(Day 9) |
| notes (prod) | http://172.16.0.182:30080, with Postgres |
| notes-dev | http://172.16.0.182:30081 |
| notes-rollout | stable 30085, canary or preview 30086 |
| podinfo | 30090 on both clusters (Day 11) |
| notes API key | lab-api-key-456 since Day 10, header
X-API-Key |
| Fleet repo | ~/argo-lab/argocd-fleet, on GitHub with deploy key |
| age key | ~/argo-lab/age.key, in the cluster as Secret
sops-age |
| Access to prod | ~/.kube/prod.yaml, context prod |
The Fleet Repo
| Path | Contents | Managed by |
|---|---|---|
bootstrap/root.yaml |
the only Application created by hand | kubectl apply |
applications/ |
Applications, ApplicationSets, project, ImageUpdater | root |
apps/notes/base, overlays/* |
notes with Kustomize, env.yaml per environment |
ApplicationSet notes |
apps/notes-rollout/ |
Rollout, Services, analysis | notes-rollout |
addons/* |
platform services for all clusters | ApplicationSet addons |
platform/argocd/ |
NodePort, argocd-rbac-cm,
argocd-notifications-cm |
argocd-extras |
platform/argo-rollouts/ |
Rollouts controller | argo-rollouts |
platform/echo/ |
receiver for webhooks | echo |
.sops.yaml |
rule for *.enc.yaml |
SOPS |
Applications
| Task | Command |
|---|---|
| List | argocd app list,
argocd app list -o name |
| State | argocd app get <app>, … --refresh,
… --hard-refresh |
| Tree | argocd app get <app> -o tree |
| Deviation | argocd app diff <app> |
| Desired state | argocd app manifests <app> |
| Sync | argocd app sync <app> [--prune] |
| Wait | argocd app wait <app> --health --sync --operation |
| History, rollback | argocd app history <app>,
argocd app rollback <app> <id> |
| Stuck sync | argocd app terminate-op <app> |
| Objects | argocd app resources <app> |
Sync and Behavior
| Setting | Effect |
|---|---|
automated: {} |
sync on new commit |
selfHeal: true |
revert deviations in the cluster |
prune: true |
delete objects whose file is gone |
CreateNamespace=true |
create the destination namespace |
ServerSideApply=true |
large objects such as CRDs |
RespectIgnoreDifferences=true |
ignoreDifferences during sync as well |
argocd.argoproj.io/sync-wave: "-1" |
order, smaller first |
argocd.argoproj.io/hook: PreSync |
Job before the sync, also Sync,
PostSync |
hook-delete-policy: BeforeHookCreation,HookSucceeded |
delete the old hook Job beforehand |
Finalizer resources-finalizer.argocd.argoproj.io |
delete objects along with the Application |
ApplicationSets
| Generator | Delivers |
|---|---|
list |
entries from the file |
git.files |
fields from files, plus {{.path.path}},
{{.path.basename}} |
git.directories |
every matching folder |
clusters |
{{.name}}, {{.server}}, filter with
selector |
matrix |
every combination of two generators |
goTemplate: truewithmissingkey=error.syncPolicy.preserveResourcesOnDeletion: truewhen data is involved.- Re-evaluate immediately: annotation
argocd.argoproj.io/application-set-refresh=true.
Projects and Permissions
| Task | Command or line |
|---|---|
| View project | argocd proj get <projekt> |
| Create user | accounts.<name>: login in
argocd-cm |
| Set password | argocd account update-password --account <name> … |
| Grant permission | p, role:<rolle>, applications, sync, <projekt>/<app>, allow |
| Assign role | g, <benutzer>, role:<rolle> |
| Check | argocd account can-i sync applications "<projekt>/*" |
| Token for pipeline | argocd proj role create-token <projekt> <rolle> --expires-in 1h |
| Switch context | argocd context <name> |
Secrets with SOPS
| Task | Command |
|---|---|
| Generate key | age-keygen -o ~/argo-lab/age.key |
| Public key | age-keygen -y ~/argo-lab/age.key |
| Encrypt | sops encrypt -i <datei>.enc.yaml |
| Read | SOPS_AGE_KEY_FILE=~/argo-lab/age.key sops decrypt <datei> |
| Change one value | sops set <datei> '["stringData"]["apiKey"]' '"neu"' |
| New recipients | sops updatekeys <datei> |
Never change an .enc.yaml by hand; the checksum covers
all fields.
Clusters
| Task | Command |
|---|---|
| Register | argocd cluster add <kontext> --kubeconfig <datei> --name <name> |
| List | argocd cluster list |
| Label | argocd cluster set <name> --label stufe=prod |
| Credentials | kubectl -n argocd get secret -l argocd.argoproj.io/secret-type=cluster |
Image Updater, Notifications, Rollouts
| Task | Command |
|---|---|
| Image Updater | kubectl -n argocd get imageupdater, logs of
argocd-image-updater-controller |
| Check trigger | kubectl -n argocd exec deploy/argocd-notifications-controller -- argocd admin notifications trigger run <trigger> <app> |
| Test message | … argocd admin notifications template notify <template> <app> --recipient <service> |
| Subscribe | annotation
notifications.argoproj.io/subscribe.<trigger>.<service>: "" |
| View rollout | kubectl argo rollouts get rollout <name> -n <ns> |
| Continue, abort | kubectl argo rollouts promote <name>,
… abort <name> |
| Status | kubectl argo rollouts status <name> -n <ns> |
| Analyses | kubectl -n <ns> get analysisrun |
Operations
| Task | Command |
|---|---|
| Backup | argocd admin export -n argocd > backup.yaml |
| Restore | argocd admin import -n argocd - < backup.yaml |
| Metrics | kubectl get --raw /api/v1/namespaces/argocd/services/argocd-metrics:metrics/proxy/metrics |
| Upgrade | kubectl apply -n argocd --server-side --force-conflicts -f install.yaml |
| Logs | kubectl -n argocd logs sts/argocd-application-controller,
deploy/argocd-repo-server |
| Log in again | argocd login 172.16.0.182:30443 --username admin --insecure |
Typical failures and their causes are on Day 14, Drill 4.