Assignments
25 practical assignments: 10 ๐ข Beginner, 10 ๐ก Intermediate, 5 ๐ด Advanced. Do them on a real cluster (kind is enough for almost all of them); reading is not enough.
Index
| # | Level | Assignment |
|---|---|---|
| 1 | ๐ข | Install Argo CD and map its components |
| 2 | ๐ข | Your first Application from the CLI |
| 3 | ๐ข | Declarative Applications and reading status |
| 4 | ๐ข | Automated sync, prune and self-heal |
| 5 | ๐ข | Deploy a Helm chart from a Helm repository |
| 6 | ๐ข | Kustomize overlays as separate Applications |
| 7 | ๐ข | History, rollback and the GitOps way to undo |
| 8 | ๐ข | Private repositories and credential templates |
| 9 | ๐ข | Order resources with sync waves |
| 10 | ๐ข | Local accounts and a read-only user |
| 11 | ๐ก | Migration hooks and failure hooks |
| 12 | ๐ก | Kill an OutOfSync loop |
| 13 | ๐ก | Custom health checks in Lua |
| 14 | ๐ก | Multi-tenant AppProjects with sync windows |
| 15 | ๐ก | RBAC and SSO group mapping |
| 16 | ๐ก | Bootstrap a cluster with app-of-apps |
| 17 | ๐ก | ApplicationSets with list and git generators |
| 18 | ๐ก | Sealed Secrets end to end, including key recovery |
| 19 | ๐ก | CI that commits to the config repo, promotion by PR |
| 20 | ๐ก | Notifications on failure and degradation |
| 21 | ๐ด | Multi-cluster fleet with cluster and matrix generators |
| 22 | ๐ด | Progressive delivery with Argo Rollouts and Prometheus |
| 23 | ๐ด | Multiple sources and Image Updater with Git write-back |
| 24 | ๐ด | Disaster recovery: delete Argo CD and rebuild it |
| 25 | ๐ด | Scale Argo CD to hundreds of apps with sharding |
๐ข Beginner
Assignment 1. Install Argo CD and map its components ๐ข
Objective: Get Argo CD running and know what every pod is for.
Tasks
- Create a kind cluster and install Argo CD from the
stablemanifests into theargocdnamespace. - List every Deployment, StatefulSet and Service in
argocd. - Retrieve the initial admin password, port-forward
argocd-server, and log in with both the UI and the CLI. - Write one sentence per component explaining its job: api-server, repo-server, application-controller, Redis, Dex, ApplicationSet controller, notifications controller.
- Delete the
argocd-redispod and confirm the UI recovers without losing any Application.
Expected outcome / acceptance criteria
argocd versionshows both client and server versions.- Your component notes correctly say which component clones Git and which one writes to the cluster.
- You can explain why deleting Redis lost nothing.
Hints
kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml. Password: argocd admin initial-password -n argocd. The controller is a StatefulSet (argocd-application-controller-0). Applications are CRs stored in etcd, Redis is only a cache.
Bonus: Install the HA manifests on a three-node kind cluster and list what changes (Redis HA with HAProxy, replica counts, anti-affinity).
Assignment 2. Your first Application from the CLI ๐ข
Objective: Deploy from Git with an imperative argocd app create and understand each flag.
Tasks
- Create a public Git repo with a folder
apps/nginxcontaining a Deployment (2 replicas) and a Service. - Create an Application
nginxwithargocd app createpointing at that path, destination namespaceweb, projectdefault. - Observe that it is
OutOfSyncandMissing. Sync it withargocd app sync. - Change the replica count in Git, push, and run
argocd app get nginx --refresh. Sync again. - Run
argocd app diff nginxbefore the second sync and read the output.
Expected outcome / acceptance criteria
- The app ends
SyncedandHealthywith the new replica count. - You can explain why the first sync failed if the
webnamespace did not exist, and fix it with--sync-option CreateNamespace=true.
Hints
argocd app create nginx --repo https://github.com/<you>/gitops-play.git --path apps/nginx --dest-server https://kubernetes.default.svc --dest-namespace web --sync-option CreateNamespace=true. argocd app diff exits 1 when there is a difference, which is handy in scripts.
Bonus: Export the Application as YAML with kubectl -n argocd get app nginx -o yaml, strip the status, and commit it. That is your first declarative app.
Assignment 3. Declarative Applications and reading status ๐ข
Objective: Manage Applications as YAML and read sync and health correctly.
Tasks
- Write
nginx-app.yamlwithproject,source,destinationand theresources-finalizer.argocd.argoproj.iofinalizer, thenkubectl applyit. - Break the Deployment on purpose in Git (an image tag that does not exist). Push and sync.
- Record the app's sync status and health status. Find the failing resource in the UI tree and in
argocd app get. - Fix the tag and confirm the app returns to
Healthy. - Delete the Application with
kubectl deleteand confirm that the finalizer removed the workload too.
Expected outcome / acceptance criteria
- In step 3 the app is
SyncedbutProgressingthenDegraded, and you can explain why sync and health disagree. - Step 5 leaves no resources behind in
web.
Hints
Deployment health turns Degraded when progressDeadlineSeconds (600s by default) is exceeded; lower it to 60 for a faster demo. Without the finalizer, deleting the Application orphans its resources.
Bonus: Repeat step 5 without the finalizer and then adopt the orphaned resources with a new Application. Notice the tracking annotation or label Argo CD adds.
Assignment 4. Automated sync, prune and self-heal ๐ข
Objective: See exactly what each automation flag does.
Tasks
- Enable
automatedsync without prune or selfHeal. Delete the Service from Git and push. Observe the result. - Enable
prune: true. Observe the result. - Run
kubectl scale deploy nginx -n web --replicas=5. Observe with selfHeal off. - Enable
selfHeal: trueand repeat step 3. - Add a ConfigMap with
kubectl createdirectly inweb(not in Git). Does Argo CD touch it?
Expected outcome / acceptance criteria
- A table with five rows: action, flag state, what Argo CD did.
- You can explain why prune is off by default and why the manually created ConfigMap is ignored (it is not tracked by the app).
Hints
Without prune, a deleted resource shows as OutOfSync with "requires pruning". argocd app set nginx --sync-policy automated --auto-prune --self-heal. Untracked resources only show up if you enable orphaned resource monitoring in the project.
Bonus: Enable orphanedResources: {warn: true} on the project and find the warning for the ConfigMap.
Assignment 5. Deploy a Helm chart from a Helm repository ๐ข
Objective: Use Argo CD as a Helm deployment tool and understand what it does differently.
Tasks
- Create an Application for the
podinfochart fromhttps://stefanprodan.github.io/podinfo, pinned to a specific chart version. - Override
replicaCountandui.messageusinghelm.valuesObject. - Run
helm list -Aand explain the result. - Upgrade the chart version by editing
targetRevisionand watch the diff before syncing. - Change
targetRevisionto a semver range (for example6.*) and explain the risk.
Expected outcome / acceptance criteria
- podinfo runs with your message.
- You can explain why
helm listis empty and what that means forhelm rollback.
Hints
Use chart: podinfo instead of path. Argo CD runs helm template and applies the output, so no release Secret exists. A range means an unreviewed chart upgrade can land on the next refresh.
Bonus: Add a Helm pre-upgrade hook Job to a chart of your own and confirm Argo CD runs it as a PreSync hook.
Assignment 6. Kustomize overlays as separate Applications ๐ข
Objective: Model environments with Kustomize and one Application per environment.
Tasks
- Create
apps/web/base(Deployment, Service) and overlaysdevandprodthat change replicas, add a label, and set a different image tag. - Create two Applications,
web-devandweb-prod, into namespacesweb-devandweb-prod. - Use
spec.source.kustomize.imagesonweb-devto override the tag without changing the overlay. - Run
argocd app manifests web-prod --source gitand compare withkustomize buildlocally.
Expected outcome / acceptance criteria
- Both apps are healthy with different replica counts and tags.
- You can explain when to put an override in the overlay vs in the Application spec (Git review vs ad hoc).
Hints
kustomize: {images: ["nginx=nginx:1.27.2"]}. Prefer overlays: overrides in the Application spec are easy to forget and do not show up when someone reads the repo.
Bonus: Set kustomize.buildOptions: --enable-helm in argocd-cm and use a helmCharts entry in a kustomization.
Assignment 7. History, rollback and the GitOps way to undo ๐ข
Objective: Know both rollback paths and why one is preferred.
Tasks
- Make three commits that change the image tag of an app and sync after each.
- Run
argocd app historyand roll back to the first entry withargocd app rollback. - Try the rollback with auto-sync enabled and record the error.
- Undo the same change with
git revertinstead, and compare the end state of Git and the cluster in both approaches.
Expected outcome / acceptance criteria
- You captured the error
rollback cannot be initiated when auto-sync is enabled. - You can explain why
argocd app rollbackleaves Git and the cluster disagreeing, and whygit revertis the standard in production.
Hints
argocd app set web --sync-policy none before rollback. After a CLI rollback the app shows OutOfSync against the branch head because Git still has the newest tag.
Bonus: Set revisionHistoryLimit: 3 on the Application and observe how history is trimmed.
Assignment 8. Private repositories and credential templates ๐ข
Objective: Connect Argo CD to private Git repos the way a real team does.
Tasks
- Make a repo private and observe the error the Application shows.
- Add the repo with an SSH deploy key using
argocd repo add, after adding GitHub's host key. - Switch to HTTPS with a fine-grained token, declared as a Secret with label
argocd.argoproj.io/secret-type: repository. - Replace the per-repo Secret with a
repo-credscredential template for the whole GitHub org or user.
Expected outcome / acceptance criteria
- Step 1 error text recorded (for example
authentication requiredorrepository not found). - After step 4, a new private repo under the same owner works with no further configuration.
Hints
ssh-keyscan github.com | argocd cert add-ssh --batch. Credential templates match by URL prefix, so https://github.com/<you> covers every repo under it.
Bonus: Use a GitHub App instead of a token (githubAppID, githubAppInstallationID, githubAppPrivateKey) and explain why it is better for an organization.
Assignment 9. Order resources with sync waves ๐ข
Objective: Control apply order and see that waves wait on health.
Tasks
- Create an app with a Namespace, a ConfigMap, a Deployment that needs the ConfigMap, and a Job that curls the Service.
- Assign waves
-2,-1,0,1respectively. - Make the Deployment slow to become ready (an
initContainerwithsleep 30) and watch the Job wait. - Remove the waves and re-sync from scratch. What breaks or races?
Expected outcome / acceptance criteria
- The sync operation details show resources applied wave by wave.
- You can explain that a wave only starts after the previous wave is healthy, and that resources without health checks count as healthy immediately.
Hints
metadata.annotations: {argocd.argoproj.io/sync-wave: "-1"}, always a quoted string. The default wave is 0. Watch with argocd app get web --refresh during the sync.
Bonus: Measure the delay between waves and find the environment variable that controls it (ARGOCD_SYNC_WAVE_DELAY).
Assignment 10. Local accounts and a read-only user ๐ข
Objective: Stop sharing admin.
Tasks
- Add local accounts
viewer(login only) andci(apiKey only) inargocd-cm. - Set passwords and generate a token for
ci. - In
argocd-rbac-cm, giveviewerread-only access andcipermission to sync apps in projectdefault. - Verify with
argocd account can-ias each user. - Disable the
adminaccount.
Expected outcome / acceptance criteria
viewercan see but not sync;cican sync using only its token.- You can still administer Argo CD after disabling
admin(because you kept an admin role somewhere).
Hints
accounts.viewer: login, accounts.ci: apiKey, admin.enabled: "false". argocd account update-password --account viewer --current-password <admin pwd>. p, ci, applications, sync, default/*, allow.
Bonus: Set policy.default to empty and confirm users with no mapping see nothing.
๐ก Intermediate
Assignment 11. Migration hooks and failure hooks ๐ก
Objective: Run database migrations safely in a GitOps sync.
Tasks
- Deploy PostgreSQL in wave
-1and an app in wave 0. - Add a
PreSyncJob that runs a migration (for examplepsql -c 'CREATE TABLE IF NOT EXISTS ...') withhook-delete-policy: BeforeHookCreation. - Make the migration fail on purpose and confirm the app is not updated.
- Add a
SyncFailhook that posts to a webhook (usehttps://webhook.site) or logs a message. - Add a
PostSyncsmoke test Job.
Expected outcome / acceptance criteria
- A failed migration leaves the old version running and triggers the SyncFail hook.
- Hooks are cleaned up according to their delete policies.
Hints
The PreSync hook runs before any Sync-phase resource, so on a brand-new install the database from wave -1 does not exist yet. Either run Postgres in a separate app, or make the migration a Sync hook in wave 1. Set activeDeadlineSeconds so a hung migration does not block forever.
Bonus: Make the migration idempotent and backward compatible (expand/contract) and explain why that matters for rollbacks.
Assignment 12. Kill an OutOfSync loop ๐ก
Objective: Reproduce and fix the most common Argo CD complaint.
Tasks
- Deploy an app whose Deployment declares
replicas: 2, then add an HPA withminReplicas: 3. - Enable auto-sync with selfHeal and observe the fight (
kubectl get deploy -w). - Fix it in two ways: (a) remove
replicasfrom the manifest, (b) keep it but addignoreDifferencesfor/spec/replicasplusRespectIgnoreDifferences=true. - Add a MutatingWebhookConfiguration from cert-manager or similar and fix a
caBundlediff withjqPathExpressions. - Try
ServerSideDiff=trueand note which false positives disappear.
Expected outcome / acceptance criteria
- The app stays
Syncedfor 30 minutes with the HPA scaling freely. - You can explain why
ignoreDifferencesalone does not stop a sync from resetting the field.
Hints
Without RespectIgnoreDifferences=true, Argo CD ignores the field in the diff but still applies the full manifest when something else triggers a sync. Use argocd app diff to confirm each fix.
Bonus: Configure the replicas ignore globally for all Deployments via resource.customizations.ignoreDifferences.apps_Deployment and discuss the risk.
Assignment 13. Custom health checks in Lua ๐ก
Objective: Make Argo CD understand a CRD's real health.
Tasks
- Install cert-manager and create a
Certificatefrom a self-signed issuer. - Write a Lua health check for
cert-manager.io/Certificatethat returnsHealthywhen theReadycondition isTrue,DegradedwhenFalse, andProgressingotherwise. - Test the script offline with
argocd admin settings resource-overrides health. - Install it in
argocd-cmand confirm the UI shows the right status for a good and a broken issuer. - Use the Certificate in wave -1 and an Ingress that needs its Secret in wave 0.
Expected outcome / acceptance criteria
- A broken issuer makes the app
Degradedwith the condition message, and wave 0 never starts.
Hints
Key: resource.customizations.health.cert-manager.io_Certificate. Check obj.status ~= nil before indexing. Argo CD ships a built-in check for many CRDs already; write your own anyway, then compare.
Bonus: Add a custom resource action in Lua (resource.customizations.actions.<group>_<kind>) that sets an annotation, and run it from the CLI.
Assignment 14. Multi-tenant AppProjects with sync windows ๐ก
Objective: Isolate two teams on one Argo CD.
Tasks
- Create projects
team-aandteam-b, each allowed only its own repo and its ownteam-x-*namespaces. - Allow no cluster-scoped kinds except
Namespace; blacklistResourceQuota,LimitRangeandNetworkPolicyin namespaces. - Try, as team-a, to deploy to
team-b-dev, to deploy a ClusterRole, and to use team-b's repo. Record each error. - Add a deny sync window for
*-prodapps every night 22:00 to 06:00, allowing manual sync. - Enable orphaned resource warnings on both projects.
Expected outcome / acceptance criteria
- Three distinct project-violation errors captured.
- A sync attempt during the window is blocked for automated sync and allowed manually.
Hints
argocd proj windows add team-a --kind deny --schedule "0 22 * * *" --duration 8h --applications '*-prod' --manual-sync. Set the schedule to the next few minutes to test it.
Bonus: Lock down the default project so it allows nothing (sourceRepos: [], destinations: []).
Assignment 15. RBAC and SSO group mapping ๐ก
Objective: Give people access through groups, not local users.
Tasks
- Configure Dex with the GitHub connector (or run Keycloak in the cluster and use
oidc.config). - Map a GitHub team (or Keycloak group) to
role:team-a-devthat can view all team-a apps and sync only*-dev. - Add an explicit deny for syncing
team-a/*-prod. - Write the policy to a file and test five decisions with
argocd admin settings rbac can. - Set
policy.default: role:readonlyand then remove it; explain the effect.
Expected outcome / acceptance criteria
- A member of the group logs in through SSO and can sync dev but gets
permission deniedon prod. - Your five offline RBAC tests match the live behaviour.
Hints
Set url: in argocd-cm to the external URL; the callback is <url>/api/dex/callback. scopes: "[groups]". GitHub team groups look like my-org:team-a.
Bonus: Create a project role with a JWT token for CI and restrict it to sync on one app.
Assignment 16. Bootstrap a cluster with app-of-apps ๐ก
Objective: Go from an empty cluster to a full platform with one command.
Tasks
- Create a
bootstrap/folder with Applications for ingress-nginx, cert-manager, metrics-server and one demo app. - Create a root Application pointing at
bootstrap/. - Add sync waves so CRD-providing apps come first, and add the Lua health check for
argoproj.io/Applicationso waves really wait. - Delete the kind cluster, recreate it, install Argo CD and apply only the root app.
Expected outcome / acceptance criteria
- The rebuild in step 4 needs exactly two commands after Argo CD is installed: apply root, wait.
- You can explain why waves on Application resources do nothing without the custom health check.
Hints
Child Application manifests must be in the argocd namespace (unless apps-in-any-namespace is enabled). Give the root app prune: true so deleting a file removes the child app, and child apps the finalizer so their resources go too.
Bonus: Make Argo CD manage itself: add an Application for the Argo CD Helm chart to bootstrap/ and upgrade Argo CD through a Git commit.
Assignment 17. ApplicationSets with list and git generators ๐ก
Objective: Stop copy-pasting Applications.
Tasks
- Write an ApplicationSet with a list generator that creates
web-dev,web-staging,web-prodwith different namespaces and value files. - Rewrite it with a git directory generator over
apps/*so each folder becomes an app. - Switch to
goTemplate: truewithmissingkey=error, then break a key name and read the error in the ApplicationSet status. - Delete a folder and observe what happens to the generated Application and its resources. Then set
preserveResourcesOnDeletion: trueand repeat. - Try
applicationsSync: create-onlyand edit a generated app by hand.
Expected outcome / acceptance criteria
- Adding a folder creates an app with no other change.
- You can explain every
applicationsSyncvalue and when you would usecreate-only.
Hints
argocd appset get <name> and kubectl -n argocd get applicationset <name> -o yaml show conditions. Use exclude: true on a directory entry to skip folders like apps/_template.
Bonus: Use templatePatch to add automated sync only for non-prod elements.
Assignment 18. Sealed Secrets end to end, including key recovery ๐ก
Objective: Keep secrets in Git safely and prove you can recover them.
Tasks
- Install the Sealed Secrets controller through Argo CD.
- Seal a database password for namespace
appand deploy it as part of an Application. - Try to use the same SealedSecret in another namespace, then reseal it with
--scope namespace-wideand retry. - Back up the sealing keys. Delete the cluster, rebuild it, restore the keys before the controller starts, and confirm the old SealedSecrets decrypt.
- Rotate the actual password: generate a new value, reseal, commit, and confirm the pod restarts with it.
Expected outcome / acceptance criteria
- Step 3 shows a decryption error under strict scope and success under namespace-wide.
- Step 4 decrypts secrets that were sealed on the old cluster.
Hints
Keys are Secrets labelled sealedsecrets.bitnami.com/sealed-secrets-key in the controller namespace. Apply the backup before installing the controller (or restart the controller after applying). Pods only see new env values after a restart: use a checksum annotation or Reloader.
Bonus: Replace Sealed Secrets with External Secrets Operator backed by a Vault dev server and write down the trade-offs.
Assignment 19. CI that commits to the config repo, promotion by PR ๐ก
Objective: Build the classic two-repo GitOps flow.
Tasks
- Create an app repo and a config repo with
envs/{dev,staging,prod}. - Write a CI pipeline (GitHub Actions, GitLab CI or Jenkins) that builds, pushes
sha-<short>and commits the tag toenvs/devusing a token scoped to the config repo only. - Handle concurrent CI runs: make the push step retry with
git pull --rebase. - Write a
promote.sh <from> <to>script or workflow that opens a PR copying the tag forward. - Protect
envs/prod/**with CODEOWNERS and branch protection.
Expected outcome / acceptance criteria
- A push to the app repo reaches dev with no human action.
- Prod changes are only possible through an approved PR.
- CI never has a kubeconfig.
Hints
yq -i '.image.tag = strenv(TAG)' envs/dev/values.yaml. Use a GitHub App token or deploy key in real setups. Guard against commit loops: the config repo must not trigger the app pipeline.
Bonus: Replace the shell promotion with Kargo and compare.
Assignment 20. Notifications on failure and degradation ๐ก
Objective: Find out about failed syncs before users do.
Tasks
- Configure the notifications controller with a webhook service (webhook.site) or Slack.
- Define templates and triggers for
on-sync-failed,on-health-degradedandon-deployed. - Subscribe one Application by annotation and one whole project through the AppProject annotation.
- Cause each event and confirm exactly one message per event (use
oncePer). - Include the commit SHA, author and a link to the app in the message.
Expected outcome / acceptance criteria
- Three distinct notifications received with useful content and no duplicates for the same revision.
Hints
notifications.argoproj.io/subscribe.on-sync-failed.webhook.<name>. oncePer: app.status.sync.revision stops repeats. Template fields: {{.app.metadata.name}}, {{.app.status.sync.revision}}, {{(call .repo.GetCommitMetadata .app.status.sync.revision).Author}}, and context.argocdUrl.
Bonus: Use the GitHub service to set a commit status on the config repo commit when a sync succeeds.
๐ด Advanced
Assignment 21. Multi-cluster fleet with cluster and matrix generators ๐ด
Objective: Manage several clusters from one Argo CD.
Tasks
- Create three kind clusters:
hub(runs Argo CD),stage-1andprod-1. Make the API servers reachable from the hub (use the Docker network IPs, not 127.0.0.1). - Register both spokes with
argocd cluster addand labelsenv=staging/env=prod, then declare the same registration as cluster Secrets. - Write a matrix ApplicationSet: clusters (by label) times git directories (
platform/*), deploying metrics-server and a demo app everywhere. - Use cluster Secret labels to opt a cluster in and out of an add-on.
- Use the RollingSync strategy so staging syncs before prod.
Expected outcome / acceptance criteria
- Adding a label to a cluster Secret deploys or removes an add-on with no other change.
- Prod apps update only after staging apps are healthy.
Hints
kind get kubeconfig --internal --name stage-1 gives a server URL reachable from other kind containers. RollingSync requires --enable-progressive-syncs on the ApplicationSet controller (applicationsetcontroller.enable.progressive.syncs: true in argocd-cmd-params-cm) and apps with automated sync configured by the strategy.
Bonus: Replace the bearer-token cluster config with exec-based auth (for EKS, awsAuthConfig with an IAM role) and explain the credential lifecycle.
Assignment 22. Progressive delivery with Argo Rollouts and Prometheus ๐ด
Objective: Release automatically based on real metrics.
Tasks
- Install kube-prometheus-stack, ingress-nginx and Argo Rollouts through Argo CD.
- Convert a Deployment to a Rollout with canary steps 10%, 30%, 60% and NGINX traffic routing.
- Write an AnalysisTemplate using a Prometheus success-rate query (from ingress-nginx metrics) with
successCondition: result[0] >= 0.99. - Release a version that returns 500 on 20% of requests and confirm the automatic abort.
- Implement a blue-green Rollout for a second service with
prePromotionAnalysisandautoPromotionEnabled: false.
Expected outcome / acceptance criteria
- The bad version is aborted with no more than 10% of traffic affected, and stable keeps serving.
- The Argo CD app shows
Suspendedduring manual pauses andDegradedafter abort.
Hints
Generate load with a hey or k6 Job. With NGINX routing Rollouts manages a canary Ingress with nginx.ingress.kubernetes.io/canary-weight. Do not let Argo CD fight over that canary Ingress: it is created by Rollouts, not in Git.
Bonus: Add a background analysis that runs for the whole rollout, and an Experiment that runs baseline and canary side by side.
Assignment 23. Multiple sources and Image Updater with Git write-back ๐ด
Objective: Combine upstream charts with your own values and automate tag bumps without CI writing to Git.
Tasks
- Deploy an upstream chart (for example
ingress-nginx) withsources: the chart from its Helm repo and the values file from your config repo viaref: values. - Pin the chart version and add Renovate (or Dependabot) to open PRs for new chart versions.
- Install Argo CD Image Updater with credentials for your registry.
- Annotate a dev Application to track
semvertags matching^1\.\d+\.\d+$with Git write-back to a separate branch. - Push a new image tag and confirm the commit Image Updater makes, and that Argo CD syncs it.
Expected outcome / acceptance criteria
- The multi-source app renders the upstream chart with your values; changing only the values file triggers a sync.
- Image Updater commits
.argocd-source-<app>.yamland never touches prod.
Hints
valueFiles: [$values/platform/ingress/values.yaml]. Image Updater only supports Helm and Kustomize sources, and Git write-back needs push credentials (write-back-method: git:secret:argocd/git-creds). Check its logs for Successfully updated image.
Bonus: Add SOPS-encrypted values to the same app through a Config Management Plugin sidecar.
Assignment 24. Disaster recovery: delete Argo CD and rebuild it ๐ด
Objective: Prove your platform survives losing its control plane.
Tasks
- Start from the hands-on lab state (or similar: root app, ApplicationSet, private repo, Sealed Secrets).
- Take a backup with
argocd admin export, and separately back up the Sealed Secrets keys. - Delete the
argocdnamespace with--cascade=orphan-style care so workloads keep running, and confirm the apps keep serving traffic. - Reinstall Argo CD, restore repo credentials and cluster Secrets, and apply the root app.
- Confirm all apps come back
Syncedwithout redeploying pods (no restarts), and write a runbook with timings.
Expected outcome / acceptance criteria
- Zero application downtime during the whole exercise.
- Recovery time measured, and the runbook lists exactly what was not in Git.
Hints
Removing the resources-finalizer.argocd.argoproj.io finalizer from every Application before deleting the namespace prevents cascade deletion of workloads. Argo CD adopts existing resources on the first sync because the manifests match; pods restart only if the spec differs.
Bonus: Run the same exercise with a hub-and-spoke setup and restore to a brand new hub cluster.
Assignment 25. Scale Argo CD to hundreds of apps with sharding ๐ด
Objective: Find and remove Argo CD's bottlenecks.
Tasks
- Generate 300 small Applications with an ApplicationSet (a list or git generator over a script-generated set of folders) across 3 kind clusters.
- Install Prometheus and the Argo CD dashboards; record reconcile duration (
argocd_app_reconcile), workqueue depth and repo-server request latency. - Shard the controller to 3 replicas with
ARGOCD_CONTROLLER_REPLICAS, tryround-robinandconsistent-hashing, and check distribution withargocd admin cluster shards. - Tune
controller.status.processors,controller.operation.processorsandreposerver.parallelism.limit, and scale the repo-server to 3. - Configure a Git webhook (use a tunnel like ngrok for the lab) plus
manifest-generate-paths, then raisetimeout.reconciliation.
Expected outcome / acceptance criteria
- A before/after table of reconcile time, memory per controller pod and Git request rate.
- A one-page recommendation for a 1,000-app installation.
Hints
Sharding is per cluster: three clusters spread over three shards; a single huge cluster does not benefit. Set the env var to the same number as StatefulSet replicas. Exclude high-churn kinds you do not deploy with resource.exclusions.
Bonus: Compare with a Flux-per-cluster design for the same fleet and argue which one you would run, including UI, tenancy and blast radius.