argocd login x509 reported, plus --insecure succeeds, explain how production should handle it.unable to resolve 'mian' to a commit SHA,app path does not exist,do not match any of the allowed destinations in project,metadata.annotations: Too long,waiting for completion of hook,another operation is already in progress,contains applications with duplicate name,permission denied: applications, sync, …,no key could decrypt secret,Manifest generation error (cached)…) lets you tell which of these categories it belongs to: Install/repo/Application, sync/diff/health, ApplicationSet/multi-cluster/permissions, secrets/delivery/performance/upgrade— and name the first diagnostic command.
helm template), how the Controller compares three-way and server-side diffs using the cluster cache, Sync's phase → wave → kind ordering and hooks, health rules (an Ingress or LoadBalancer with no address is Progressing), AppProject validation of source / destination / resource kinds, Casbin RBAC decisions, ApplicationSet generator expansion into Applications, and sharding and caching.
lab (plus a second cluster lab2) and your gitops-lab repository's lab8 branch, reproduce, diagnose, fix and clean up more than 40 of these issues without affecting the main branch's podinfo application.
| # | Time | Module | Core content | Animation · interactive | Lab |
|---|---|---|---|---|---|
| 0 | Pre-class | Instructions and fault lab environment | Confirm kind cluster lab with Argo CD v3.6; in gitops-lab create lab8 branch and lab8/ directory; generate helper scripts lab8.sh; create lab project lab8 | Environment self-check | Generate lab8.sh
|
| 1 | 00–08 | A · Install, repos and Application | Issues 1–12: CLI certificates and gRPC, initial password, Ingress redirect loop, repo authentication, known_hosts, private CA,to a commit SHA,app path does not exist, Helm values files and multi-source $values, destination not in project, source repo not in project,existing application spec is different | “Application won't start” troubleshooting decision tree | Revision · path · project boundary |
| 2 | 08–16 | A · Sync, diff and health | Issues 13–25: permanent OutOfSync caused by HPA / webhooks, default-value normalization diffs, annotations too long, CRD does not exist, namespace does not exist, namespace missing, hook stuck, operation in progress, Progressing never ends, progress deadline exceeded, not pruned, shared resources, deletion stuck | Sync execution simulator (phase / wave / hooks / health) | Drift · hooks · health · finalizer |
| 3 | 16–24 | A · ApplicationSet, multi-cluster and permissions | Issues 26–38: duplicate names, missing template keys, cascade deletion when deleting an AppSet, Git generator delay, project does not exist, cluster name does not exist, kind's 127.0.0.1, RBAC denial, SSO group not taking effect, v3 log permissions, v3 fine-grained permissions, cluster-scoped resources not on the allowlist, Applications in any namespace | RBAC decision simulator | AppSet · lab2 · RBAC |
| 4 | 24–30 | A · Secrets, delivery, performance and upgrades | Issues 39–50: Sealed Secrets cannot decrypt / already exists, ESO sync failure, CMP cannot find plugin, render timeout and cached errors, sync windows, Rollouts paused and aborted, Image Updater not updating, notifications not sent, controller OOM and slowness, Git polling and rate limiting, CRDs and tracking methods when upgrading to v3 / 3.3+ | “Slow / not updating / abnormal after upgrade” troubleshooting decision tree | Secrets · sync windows · render timeout |
| 5 | 30–37 | B · GitOps and architecture | Interview 1–13 | Mock interview | 2 scenario questions |
| 6 | 37–44 | B · Application and sync | Interview 14–25 | Mock interview | 2 scenario questions |
| 7 | 44–52 | B · Scale, multi-tenancy and security | Interview 26–38 | Mock interview | 3 scenario questions |
| 8 | 52–60 | B · Scenario design and incident post-mortems | Interview 39–50 (including 6 incident post-mortem questions) | Mock interview | 3 scenario questions |
| — | Post-class | Cheat sheet · Comprehensive practice | 50 “error → first command → fix” entries; 50 flash cards; 8 mixed faults; full mock interview | Full mock interview | Course exam: 12 questions |
| Topic | m1 | m2 | m3 | m4 | m5 | m6 | m7 | m8 |
|---|---|---|---|---|---|---|---|---|
| Architecture and reconciliation loop (Repo Server / Controller / Redis / API Server) | ● | ● | — | ● | ● | ● | ● | ● |
| Repositories, credentials, manifest sources (Kustomize / Helm / multi-source / CMP) | ● | — | — | ● | ● | ● | ● | — |
| Sync: options, wave, hooks, prune, selfHeal, SSA | — | ● | ● | ● | — | ● | — | ● |
| Diff and health: ignoreDifferences, Server-Side Diff, Lua health | — | ● | — | ● | ● | ● | — | ● |
| App of Apps, ApplicationSet, generators and progressive sync | — | — | ● | — | — | — | ● | ● |
| Multi-cluster, AppProject, RBAC, SSO | ● | — | ● | — | ● | — | ● | ● |
| Secrets management (Sealed Secrets / ESO / SOPS) and supply chain | — | — | — | ● | ● | — | ● | ● |
| Progressive delivery (Rollouts, Image Updater, notifications, sync windows, promotion) | — | — | — | ● | — | ● | — | ● |
| Performance, sharding, monitoring, high availability | — | — | — | ● | ● | — | ● | ● |
| Upgrades (v2 → v3, 3.3 CRDs, 3.5 Helm 4), disaster recovery and post-mortems | ● | — | ● | ● | ● | ● | ● | ● |
commit SHA,allowed destinations,Too long,hook,duplicate,permission denied,decrypt,cached) into the filter box.
Symptom → raw error / status condition → root cause (at the mechanism level) → diagnostic command (argocd CLI and kubectl) → sample expected output → fix → prevention and best practices → reproduction lab (gitops-lab of the lab8 branch) → see Lesson N. Raw error messages are labeled with three sources:Source-verified means checked character by character against the format strings in the Argo CD v3.6.1 source (argoproj/argo-cd tag v3.6.1, including the already-merged gitops-engine/); variable parts (names, URLs, times) are examples;Official docs means quoted from argo-cd.readthedocs.io or related project docs / source (Sealed Secrets v0.41.2, ESO v2.15.0);Check against actual output means the outer wrapper from Git, gRPC, the Go standard library or the Kubernetes API; prefixes and wording vary by version and transport (git CLI / go-git, gRPC / gRPC-Web).
Question → 30-second answer → in-depth answer (principles, YAML / commands) → common follow-ups → bonus points → common wrong answers. Difficulty:BeginnerIntermediateAdvanced. Target roles: Senior Cloud / DevOps / Platform Engineer. Module 8 contains 6 incident post-mortem questions (Q41, Q42, Q43, Q44, Q48, Q50) and 6 platform design questions.
| Course | Most-referenced content in this lesson |
|---|---|
| Lesson 1: GitOps and Argo CD core · Lesson 2: Application in depth | reconciliation loop (Repo Server rendering → Controller comparison → Sync / Health → writing status back), refresh and hard refresh, self-heal and prune; manifest sources, multi-source $values, sync options (ServerSideApply, CreateNamespace, Replace, PruneLast), Sync Waves and hooks, Lua health checks, ignoreDifferences, annotation tracking
|
| Lesson 3: App of Apps and ApplicationSet · Lesson 4: Multi-cluster and multi-tenancy | generators, goTemplate,applicationsSync policies,preserveResourcesOnDeletion, RollingSync; AppProject sources / destinations / allowlists,policy.csv, project roles and tokens, Dex / OIDC, declarative cluster Secrets,lab2 registration,application.namespaces
|
| Lesson 5: Security and secrets · Lesson 6: Progressive delivery · Lesson 7: Scale and troubleshooting | credential templates, Sealed Secrets, ESO, SOPS + CMP sidecar; Rollouts, Image Updater (v1.x's ImageUpdater CR), Notifications, sync windows; sharding, processor counts, Repo Server cache and timeouts, metrics, deletion and finalizers, upgrades and argocd admin export
|
argo/argo-cd 10.18.0, appVersion v3.6.1,kubeVersion >=1.25.0-0) as its baseline; the Kubernetes versions officially tested for 3.6 are v1.37, v1.36, v1.35 and v1.34, and kind v0.33.0's default node image is kindest/node:v1.37.0. Version changes directly related to this lesson's issues: v3.0 default annotation tracking, enforced log RBAC,update/delete no longer inherited by child resources; removed argocd-cm in the old-style repository configuration, ignored by default status fields and updates in ignoreDifferences; 3.3 the ApplicationSet CRD exceeds the annotation limit for client-side apply, so an upgrade with server-side apply is required; 3.5 built-in Helm upgraded to 4.2.0, and GnuPG verification replaced by Source Integrity; 3.6 enabling ServerSideApply=true applications switch to Server-Side Diff. Adjacent tools (verified 2026-11-17): Argo Rollouts v1.10.2, Argo CD Image Updater v1.5.0, Sealed Secrets v0.41.2, External Secrets Operator v2.15.0, Kargo v1.12.6, podinfo 6.17.0.lab (from Lesson 4 onward there is also lab2), namespaces argocd Argo CD and the gitops-lab repository; all faults are placed in separate lab8 branch,lab8 project and lab8-* namespacesgitops-lab create a lab8 branch, with the fault list in lab8/pbNN-*/; create an AppProject that only allows lab8-* namespace lab8, so the experiments will not touch podinfo-* production applications.
lab8.sh: one-command creation of fault Applications, viewing Conditions and operation status, collecting component logs, and cleanup.
lab (context kind-lab), with Argo CD installed from the official chart argo/argo-cd in the argocd namespace (release name argocd, values file ~/gitops-lab/bootstrap/argocd-values.yaml) kubectl -n argocd port-forward svc/argocd-server 8080:443 after argocd login localhost:8080 --insecure.
gitops-lab (example https://github.com/<you>/gitops-lab, local clone ~/gitops-lab, default branch main), which contains apps/podinfo/base and overlays/dev|staging|prod.
lab2 (created in Lesson 4; Argo CD cluster name lab2); the secrets issues in Module 4 need the Sealed Secrets controller installed in Lesson 5 (ESO optional). Without them, read these issues only, or install the minimal starting point given at the beginning of each lab.
kind create cluster --name lab # kind v0.33.0 default kindest/node:v1.37.0
helm repo add argo https://argoproj.github.io/argo-helm && helm repo update
helm upgrade --install argocd argo/argo-cd -n argocd --create-namespace --version 10.18.0
kubectl -n argocd rollout status deploy/argocd-server
kubectl -n argocd port-forward svc/argocd-server 8080:443 &
argocd login localhost:8080 --username admin --insecure \
--password "$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d)"
argocd account update-password --current-password "$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d)" \
--new-password 'Lab-Argo-2026!' # Lab password matching Lesson 1 (local lab only)
export ADMIN_PASS='Lab-Argo-2026!' P='Lab-Argo-2026!'
Outcomes from Lesson 1 also include the values file ~/gitops-lab/bootstrap/argocd-values.yaml (later used to helm upgrade argocd argo/argo-cd -n argocd --version 10.18.0 -f … modify the configuration), Application podinfo-dev (project default,automated + prune + selfHeal, with resources-finalizer.argocd.argoproj.io). The lab in this lesson uses $ADMIN_PASS / $P all refer to the lab password Lab-Argo-2026!.
kubectl config current-context argocd version --short 2>/dev/null || argocd version kubectl -n argocd get pods argocd app list -o name
kind-lab argocd: v3.6.1+94037c4 argocd-server: v3.6.1+94037c4 NAME READY STATUS RESTARTS AGE argocd-application-controller-0 1/1 Running 0 2d argocd-applicationset-controller-7c9d… 1/1 Running 0 2d argocd-dex-server-6b8f… 1/1 Running 0 2d argocd-notifications-controller-5d7c… 1/1 Running 0 2d argocd-redis-6f9b… 1/1 Running 0 2d argocd-repo-server-84c6… 1/1 Running 0 2d argocd-server-7f6d… 1/1 Running 0 2d argocd/podinfo-dev (plus other applications created in Lessons 2–7, such as podinfo-staging, podinfo-prod, root)
Note argocd-application-controller is StatefulSet (sharding assigns clusters by ordinal); the rest are Deployments. The CLI and server should stay on the same minor version.
cd ~/gitops-lab && git switch -c lab8 && mkdir -p lab8 && git commit --allow-empty -m "lab8: start" && git push -u origin lab8
kubectl apply -f - <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata: {name: lab8, namespace: argocd}
spec:
description: Hour-8 fault lab - only lab8-* namespaces
sourceRepos: ['https://github.com/<you>/gitops-lab']
destinations:
- {server: https://kubernetes.default.svc, namespace: 'lab8-*'}
clusterResourceWhitelist: [] # by default no cluster-scoped resources are allowed (used by issue #37)
EOF
cat > ~/gitops-lab/lab8/lab8.sh <<'EOF'
# Usage: source ~/gitops-lab/lab8/lab8.sh
L8_REPO=${L8_REPO:-https://github.com/<you>/gitops-lab}
# Create a fault Application pointing to a directory of the lab8 branch: l8_app pb08 lab8/pb08-path [extra argocd arguments…]
l8_app() { local n=$1 p=$2; shift 2
argocd app create "lab8-$n" --project lab8 --repo "$L8_REPO" --revision lab8 --path "$p" \
--dest-server https://kubernetes.default.svc --dest-namespace "lab8-$n" --label lab8=true --upsert "$@"; }
# View Conditions, Sync/Health and the latest operation
l8_why() { argocd app get "lab8-$1" --show-operation | sed -n '1,40p'
kubectl -n argocd get application "lab8-$1" -o jsonpath='{range .status.conditions[*]}{.type}{": "}{.message}{"\n"}{end}'; }
# Component logs (default controller): l8_logs repo-server 50
l8_logs() { local c=${1:-application-controller} n=${2:-80}
if [ "$c" = application-controller ]; then kubectl -n argocd logs sts/argocd-application-controller --tail="$n"
else kubectl -n argocd logs deploy/argocd-"$c" --tail="$n"; fi; }
# Clean up all lab8 applications (non-cascading; argocd removes the finalizer first) and the namespace
l8_clean() { argocd app list -l lab8=true -o name | xargs -r -n1 argocd app delete --yes --wait
kubectl get ns -o name | grep '^namespace/lab8-' | xargs -r kubectl delete --wait=false; }
EOF
source ~/gitops-lab/lab8/lab8.sh && type l8_app | head -1
l8_app is a function
lab8.sh itself does not need to be committed to Git (it is not an object rendered by Argo CD); but it can be committed for team sharing, and Argo CD will not treat .sh as a manifest. Each fault directory (for example lab8/pb08-path/) is given in the "reproduction lab" of the corresponding issue; commit it to the lab8 branch, then use l8_app to create the application.
| Convention | Description |
|---|---|
Application name lab8-pbNN, namespace lab8-pbNN | both carry the label lab8=true; project lab8 only allows lab8-* namespace — this itself demonstrates the project boundary (#10, #37)
|
Git revision is pinned to lab8 branch | Do not create faults on main ; for comparison, use git diff main lab8 -- lab8/
|
to change Argo CD configuration (argocd-cm,argocd-rbac-cm,argocd-cmd-params-cm) — back up first | kubectl -n argocd get cm argocd-cm argocd-rbac-cm argocd-cmd-params-cm -o yaml > ~/lab8-cm-backup.yaml; in production these should all be managed by Helm values / Git; after the lab, use helm upgrade to restore
|
| (auto-sync disabled by default) | Fault applications are manually synced by default so you can watch each step; issues that need auto-sync (#13, #23, #50) are explained separately |
status.conditions) → operation status (status.operationState) → resource tree (argocd app resources,argocd app get) → diff (argocd app diff) → component logs (repo-server handles rendering, application-controller handles comparison and sync, server handles the API and RBAC, applicationset-controller handles generation).
ComparisonError,Manifest generation error) → repo-server; sync errors (one or more objects failed to apply) → controller + target cluster API; denials (permission denied) → server; AppSet Condition → applicationset-controller.
lab8 relax the project's destination to *.source ~/gitops-lab/lab8/lab8.sh && l8_clean kubectl -n argocd delete appproject lab8 --ignore-not-found kubectl apply -f ~/lab8-cm-backup.yaml # restore configuration (or helm upgrade argocd argo/argo-cd -n argocd -f ~/gitops-lab/bootstrap/argocd-values.yaml) cd ~/gitops-lab && git switch main # the lab8 branch can be kept for review, or git push origin --delete lab8
sourceRepos and destinations). Errors from each stage appear in different places: CLI terminal,argocd repo list 's connection status,ComparisonError Condition,InvalidSpecError Condition.
helm template / CMP, and caches the result in Redis; the message prefix for render failures is Failed to load target state: failed to generate manifest for source 1 of 1: ….
argocd repo get,argocd app get --hard-refresh,argocd app manifests,argocd proj get and repo-server logs to pinpoint the specific cause within 2 minutes.
Enter keywords from the error or symptom (such as x509,redirect,authentication,knownhosts,commit SHA,app path,values,allowed destinations,not permitted,upsert) to filter; click a row to jump to the matching entry in “Issue details.”
$ argocd login localhost:8080 FATA[0000] rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority"
Check against actual output the wording comes from Go's crypto/tls and gRPC; varies slightly by Go version.
Symptom: A freshly installed Argo CD: the UI opens after “continue to site” in the browser, but CLI login fails; or after exposure through an Ingress (which only forwards HTTP/1.1),argocd login succeeds but argocd app list hangs or reports a protocol error.
Root cause: argocd-server uses a default self-signed certificate (generated by argocd-secret , or provided with argocd-server-tls Secret), and the CLI verifies certificates by default. The CLI uses native gRPC (HTTP/2); many Ingresses and load balancers only support HTTP/1.1, so you need --grpc-web to let the CLI communicate over HTTP/1.1 via gRPC-Web.
openssl s_client -connect localhost:8080 -servername localhost </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates kubectl -n argocd get secret argocd-server-tls 2>&1 | head -2 # if present, prefer its certificate argocd login argocd.example.com --grpc-web --loglevel debug # compare gRPC and gRPC-Web
subject=O = Argo CD issuer=O = Argo CD Error from server (NotFound): secrets "argocd-server-tls" not found
argocd login localhost:8080 --insecure # lab only: skip certificate verification argocd login argocd.example.com --grpc-web # when going through an HTTP/1.1 Ingress # Production: issue a certificate with cert-manager and place it in argocd-server-tls, or terminate TLS at the Ingress and run the server in insecure mode (#3)
~/.config/argocd/config the team's docs grpc-web: true.admin account and --insecure: use a project token or the API key of a local account, and access through a trusted certificate.argocd logout localhost:8080; argocd login localhost:8080 --username admin --password "$P"; echo "exit=$?" # observe x509 argocd login localhost:8080 --username admin --password "$P" --insecure
See also Lesson 1 Module 3 Installation and CLI login,Lesson 5 Module 1 Security hardening.
$ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}'
Error from server (NotFound): secrets "argocd-initial-admin-secret" not found
Official docs FAQ: since v1.9 the initial password is in argocd-initial-admin-secret ; to change the password, update argocd-secret of admin.password (bcrypt hash).
Symptom: A colleague followed the getting-started guide's advice to “delete the initial Secret after changing the password”; or Argo CD is self-managed by GitOps and the initial Secret was pruned because it is not in Git; a new team member cannot get the admin password.
Root cause: The initial Secret is only a “plaintext copy for first login”; what actually takes effect is argocd-secret in admin.password (bcrypt) and admin.passwordMtime. Deleting the initial Secret does not affect login; it only loses the plaintext.
kubectl -n argocd get secret argocd-secret -o jsonpath='{.data}' | jq 'keys'
argocd admin initial-password -n argocd # read the initial password (while the Secret exists)
kubectl -n argocd get cm argocd-cm -o jsonpath='{.data.admin\.enabled}'
HASH=$(argocd account bcrypt --password 'N3w-Strong-Pass!')
kubectl -n argocd patch secret argocd-secret -p "{\"stringData\":{\"admin.password\":\"$HASH\",\"admin.passwordMtime\":\"$(date -u +%FT%TZ)\"}}"
argocd login localhost:8080 --username admin --password 'N3w-Strong-Pass!' --insecure
admin.enabled: "false" (argocd-cm), keep admin only as a break-glass account stored in the password vault.argocd-secret / the initial Secret into the prune scope (the Helm chart manages it by default argocd-secret; note configs.secret.createSecret).This page isn't working argocd.example.com redirected you too many times. ERR_TOO_MANY_REDIRECTS
Official docs Ingress configuration docs: when the Ingress terminates TLS, the API server should turn TLS off — add --insecure, or in argocd-cmd-params-cm set server.insecure: "true".
Symptom: The Ingress (ingress-nginx, Traefik, cloud LB) terminates HTTPS at the edge and forwards HTTP to port 80 of argocd-server; argocd-server sees an HTTP request and returns a 307 redirect to HTTPS; the browser goes back through the Ingress over HTTP to the backend… an endless loop.
Root cause: Both layers want to “own” TLS. Use either TLS passthrough (the backend terminates TLS) or edge termination with an insecure backend; do not split the work between the two.
curl -skI https://argocd.example.com | sed -n '1,5p'
kubectl -n argocd get cm argocd-cmd-params-cm -o jsonpath='{.data.server\.insecure}'; echo
kubectl -n argocd get ingress -o yaml | grep -E 'backend-protocol|ssl-passthrough|servicePort|number'
HTTP/2 307 location: https://argocd.example.com/ false
configs:
params:
server.insecure: true # when TLS terminates at the edge
server:
ingress:
enabled: true
hostname: argocd.example.com
tls: true
helm upgrade argocd argo/argo-cd -n argocd -f ~/gitops-lab/bootstrap/argocd-values.yaml kubectl -n argocd rollout restart deploy/argocd-server # params are only read at startup
server.insecure (the CLI uses --grpc-web, or create a separate Ingress for gRPC / use an LB that supports an HTTP/2 backend).argocd-cmd-params-cm changes require restarting the corresponding component — a common reason for “changed but no effect.”See Lesson 1 Module 3,Lesson 7 Module 1 High-availability deployment.
TYPE NAME REPO INSECURE OCI LFS CREDS STATUS MESSAGE git https://github.com/<you>/gitops-lab-private false false false true Failed Unable to connect to repository: rpc error: code = Unknown desc = error testing repository connectivity: authentication required
Source-verified Prefix Unable to connect to repository: %v (server/repository/repository.go);depends on actual output authentication required comes from go-git's transport layer; over HTTPS it can also appear as authentication failed or as 403 text.
Symptom: A newly created application reports ComparisonError, or an application that has been running for months suddenly reports Unknown: GitHub fine-grained PAT expired, unauthorized token after SSO enforcement, repo made private, old URL no longer redirects after a rename.
Root cause: Repo Server accesses Git using credentials from a argocd.argoproj.io/secret-type: repository (single repo) or a repo-creds (credential template matched by URL prefix) Secret. The URL must match the one in the Application repoURL exactly (including .git suffix, case,https and ssh forms) to match a single-repo credential; credential templates match by longest prefix.
argocd repo list argocd repo get https://github.com/<you>/gitops-lab-private --refresh hard kubectl -n argocd get secret -l argocd.argoproj.io/secret-type -o custom-columns=NAME:.metadata.name,TYPE:.metadata.labels.argocd\.argoproj\.io/secret-type kubectl -n argocd logs deploy/argocd-repo-server --tail=50 | grep -iE 'auth|denied|403'
apiVersion: v1
kind: Secret
metadata:
name: github-org-creds
namespace: argocd
labels: {argocd.argoproj.io/secret-type: repo-creds}
stringData:
type: git
url: https://github.com/<you> # prefix
username: x-access-token
password: <PAT or GitHub App token>
# GitHub App is recommended: githubAppID / githubAppInstallationID / githubAppPrivateKey
argocd_git_lsremote_fail_total / argocd_git_fetch_fail_total .argocd-cm old-style repositories / repository.credentials configuration; you must migrate to Secrets before upgrading (#50).argocd repo add https://github.com/<you>/gitops-lab-private --username x --password wrong # observe the failure argocd repo list
See Lesson 5 Module 2 Repo credentials and credential templates.
Unable to connect to repository: rpc error: code = Unknown desc = error testing repository connectivity: ssh: handshake failed: knownhosts: key is unknown
Symptom: Adding a repo with git@github.com:<you>/gitops-lab.git fails; or after the Git server changes its host key (self-hosted GitLab reinstalled or migrated), all applications fail; an intranet Gitea uses a non-22 port.
Root cause: Argo CD performs strict host key verification, known hosts are stored in a ConfigMap argocd-ssh-known-hosts-cm (mounted into repo-server). By default only the keys of a few public hosting platforms are pre-seeded. Since v3.5, even if the repo has no configured credentials, SSH connections will also use known_hosts (upgrade notes: “SSH known_hosts now used for repositories without configured credentials”).
argocd cert list --cert-type ssh
kubectl -n argocd get cm argocd-ssh-known-hosts-cm -o jsonpath='{.data.ssh_known_hosts}' | grep -c .
ssh-keyscan -p 2222 gitea.example.internal 2>/dev/null | head -2
ssh-keyscan -p 2222 gitea.example.internal | argocd cert add-ssh --batch # or declaratively: write the ssh-keyscan output into configs.ssh.extraHosts in Helm values
insecure: "true" to skip host verification — that gives up man-in-the-middle protection.See Lesson 5 Module 2.
Unable to connect to repository: rpc error: code = Unknown desc = error testing repository connectivity: Get "https://gitlab.corp.local/platform/gitops.git/info/refs?service=git-upload-pack": tls: failed to verify certificate: x509: certificate signed by unknown authority
Symptom: The company intranet GitLab, Harbor (Helm OCI) and Nexus use certificates issued by the enterprise CA; developer machines trust that CA, but Argo CD does not.
Root cause: The repo-server container's system trust store does not contain the enterprise CA. Argo CD's approach is to put the PEM certificate into a ConfigMap argocd-tls-certs-cm (key name is server hostname), mounted into repo-server.
argocd cert list --cert-type https openssl s_client -connect gitlab.corp.local:443 -showcerts </dev/null 2>/dev/null | grep -E 's:|i:'
argocd cert add-tls gitlab.corp.local --from ./corp-root-ca.pem # declarative (Helm values) # configs: # tls: # certificates: # gitlab.corp.local: | # -----BEGIN CERTIFICATE----- …
--insecure-skip-server-verification.See Lesson 5 Module 2.
CONDITION MESSAGE ComparisonError Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = unable to resolve 'mian' to a commit SHA
Source-verified Failed to load target state: (controller/state.go),failed to generate manifest for source %d of %d: %w,unable to resolve '%s' to a commit SHA (util/git/client.go).
Symptom: A newly created application directly Unknown; or one day a batch of preview-environment applications all start failing — the feature branch was deleted automatically after being merged.
Root cause: Repo Server uses git ls-remote to resolve targetRevision (branch, tag,HEAD or SHA) into a commit SHA; if the reference cannot be found, this error is reported. Common causes: typos, a tag that exists only locally and was never pushed, a deleted branch, or the repo's default branch changing from master to main.
argocd app get lab8-pb07 -o json | jq -r '.spec.source.targetRevision' git ls-remote https://github.com/<you>/gitops-lab | grep -E 'refs/(heads|tags)/' | head kubectl -n argocd logs deploy/argocd-repo-server --tail=30 | grep -i 'resolve'
argocd app set lab8-pb07 --revision lab8 # or change the Application manifest in Git (required when managed declaratively) argocd app get lab8-pb07 --hard-refresh
git ls-remote --exit-code "$REPO" "$REV".source ~/gitops-lab/lab8/lab8.sh mkdir -p ~/gitops-lab/lab8/pb07 && kubectl create configmap pb07 --from-literal=k=v --dry-run=client -o yaml > ~/gitops-lab/lab8/pb07/cm.yaml cd ~/gitops-lab && git add lab8 && git commit -qm "lab8: pb07" && git push -q l8_app pb07 lab8/pb07 --revision mian --sync-option CreateNamespace=true; sleep 5; l8_why pb07 | grep -i -A1 condition
See Lesson 1 Module 4 First Application,Lesson 3 Module 6 Pull Request generator.
ComparisonError Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = apps/podinfo/overlays/Prod: app path does not exist
Source-verified util/app/path/path.go: "%s: %w" + app path does not exist; the same file also contains app path is absolute,app path outside root,app path is not a directory.
Symptom: Developers test on macOS (case-insensitive file system) and it works, but Argo CD reports that the path does not exist; or the directory was refactored and the Application was not updated; or the path begins with / .
Root cause: Repo Server checks out the repo in a Linux container; the path is case-sensitive, must be a directory relative to the repo root, and must not escape the repo root through a symbolic link. The directory must exist in targetRevision the commit being pointed to (existing on main but not on the lab8 branch will also fail).
argocd app get lab8-pb08 -o json | jq -r '.spec.source | "\(.targetRevision) \(.path)"' git -C ~/gitops-lab ls-tree -d --name-only -r origin/lab8 | grep -i 'overlays/prod'
lab8 apps/podinfo/overlays/Prod apps/podinfo/overlays/prod
argocd app set lab8-pb08 --path apps/podinfo/overlays/prod
path exists on the target branch (a simple yq + test -d script is enough).ComparisonError Failed to load target state: failed to generate manifest for source 1 of 2: rpc error: code = Unknown desc = … open values/myapp/prod.yaml: no such file or directory
Symptom: After managing the Helm chart and environment values separately (the chart comes from a Helm repository, the values from gitops-lab), the application reports that the values file does not exist; or the file exists but changes have no effect.
Root cause (three common cases):① In a multi-source application, a file from another source must be referenced as $<ref name>/path, and the referenced source must set ref: values; with a relative path Argo CD looks inside the chart source. ②valueFiles paths are relative to the chart directory, not the repo root. ③ The values source's targetRevision points to another branch, so you are editing a branch that is not the one being read.
argocd app get myapp-prod -o json | jq '.spec.sources' argocd app manifests myapp-prod --source git | grep -m3 -E 'image:|replicas:' argocd app get myapp-prod --hard-refresh
spec:
sources:
- repoURL: https://github.com/<you>/gitops-lab
targetRevision: main
ref: values # provides files only; does not render
- repoURL: https://github.com/<you>/gitops-lab
targetRevision: main
path: apps/myapp
helm:
valueFiles:
- $values/values/myapp/prod.yaml # reference the source above via $values
ignoreMissingValueFiles: false # keep false in production: a missing file should fail
ignoreMissingValueFiles: true to hide errors; use argocd app manifests to review the final rendered output in code review.helm template before upgrading.See Lesson 2 Module 2 Multi-source Application and separating Helm values.
CONDITION MESSAGE InvalidSpecError application destination server 'https://kubernetes.default.svc' and namespace 'podinfo-prod' do not match any of the allowed destinations in project 'team-a'
Source-verified util/argo/argo.go: application destination server '%s' and namespace '%s' do not match any of the allowed destinations in project '%s'.
Symptom: Team A copied Team B's Application template and deployed it to a namespace it does not own; or the platform team added a new cluster and the project's destinations was not updated; or destination.name is used while the project only lists server.
Root cause: AppProject is the multi-tenant boundary: spec.destinations lists allowed (cluster, namespace) combinations, supporting wildcards and ! negation. An Application that does not match is not reconciled (or synced); this is the intended protective behavior.
argocd proj get team-a
kubectl -n argocd get appproject team-a -o jsonpath='{.spec.destinations}' | jq
argocd app get podinfo-prod -o json | jq '.spec.destination'
First ask, “Should this application be deployed there?” If the Application was written wrongly, change the Application; if it really is needed, the platform team changes the project in Git:
spec:
destinations:
- {server: https://kubernetes.default.svc, namespace: 'team-a-*'}
- {name: lab2, namespace: 'team-a-*'}
team-a-*), and the project destination uses a prefix wildcard; do not write namespace: '*' just to “get it running.”l8_app pb10 lab8/pb07 --dest-namespace default; sleep 3; l8_why pb10 | grep InvalidSpecError argocd app set lab8-pb10 --dest-namespace lab8-pb10 && l8_why pb10 | grep -c InvalidSpecError
See Lesson 4 Module 1 AppProject boundaries,Module 2 Sources, destinations and allowlists.
InvalidSpecError application repo https://github.com/<you>/charts-sandbox is not permitted in project 'team-a'
Source-verified util/argo/argo.go: application repo %s is not permitted in project '%s'.
Symptom: A team wants to reference a new Helm repository or a forked repo; or the second source of a multi-source application (ref: values) has not been added to the project; or the URL is written as git@github.com:… while the project has https://….
Root cause:spec.sourceRepos is the list of allowed source URLs (supports globs and ! negation),every source must match, including the ref source and the chart repository addresses of Helm dependencies. Matching is string-based; SSH and HTTPS forms are not treated as the same repository.
kubectl -n argocd get appproject team-a -o jsonpath='{.spec.sourceRepos}'; echo
argocd app get myapp -o json | jq -r '.spec.source.repoURL // .spec.sources[].repoURL'
argocd proj add-source team-a 'https://github.com/<you>/*' # or change the project YAML in Git
$ argocd app create podinfo-dev --repo … --path apps/podinfo/overlays/dev … FATA[0001] rpc error: code = InvalidArgument desc = existing application spec is different, use upsert flag to force update
Source-verified server/application/application.go: existing application spec is different, use upsert flag to force update.
Symptom: The CI script runs argocd app create every time; one day someone also declared an Application with the same name in Git (App of Apps), or changed parameters in the UI — CI starts failing; adding --upsert makes both sides keep overwriting each other's changes.
Root cause: One Application has two “sources of truth”: imperative (CLI / UI / API) and declarative (the Application manifest in Git, synced by a parent app). When the parent app has selfHeal enabled, it reverts the CLI's changes; the CLI --upsert changes them back again.
kubectl -n argocd get application podinfo-dev -o jsonpath='{.metadata.annotations.argocd\.argoproj\.io/tracking-id}'; echo
argocd app list -o wide | grep -E 'root|apps' # whether a parent app manages it
kubectl -n argocd get application podinfo-dev -o yaml | grep -A3 managedFields | head
root:argoproj.io/Application:argocd/podinfo-dev
argocd/apps/ synced by root ), CI only changes Git (image tags, values) and does not call argocd app create/set.argocd app wait podinfo-dev --health --sync --timeout 300.applications, update ; in production projects, prohibit changing parameters through the UI (parameter overrides).See Lesson 3 Module 2 App of Apps and bootstrap,Lesson 6 Module 1 Who changes Git.
Answer step by step from the first symptom you see to reach the most likely issue number and the first command. Each conclusion maps to an issue detail in this module or another module.
lab, Argo CD v3.x,gitops-lab 's lab8 branch, AppProject lab8; already executed source ~/gitops-lab/lab8/lab8.sh. Output is an example (Condition text format checked against v3.6.1 source); names and times depend on actual output.mkdir -p ~/gitops-lab/lab8/pb07 kubectl create configmap pb07 --from-literal=k=v --dry-run=client -o yaml > ~/gitops-lab/lab8/pb07/cm.yaml cd ~/gitops-lab && git add lab8 && git commit -qm "lab8: pb07" && git push -q
l8_app pb07 lab8/pb07 --revision mian --sync-option CreateNamespace=true sleep 5; l8_why pb07 | tail -2
ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = unable to resolve 'mian' to a commit SHA
argocd app set lab8-pb07 --revision lab8 --path lab8/PB07 argocd app get lab8-pb07 --hard-refresh >/dev/null; l8_why pb07 | tail -1
ComparisonError: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = lab8/PB07: app path does not exist
argocd app set lab8-pb07 --path lab8/pb07 && argocd app sync lab8-pb07 && argocd app wait lab8-pb07 --health --timeout 60
l8_app pb10 lab8/pb07 --dest-namespace default sleep 3; l8_why pb10 | grep InvalidSpecError
InvalidSpecError: application destination server 'https://kubernetes.default.svc' and namespace 'default' do not match any of the allowed destinations in project 'lab8'
argocd app set lab8-pb10 --dest-namespace lab8-pb10 --repo https://github.com/argoproj/argocd-example-apps --path guestbook --revision HEAD sleep 3; l8_why pb10 | grep InvalidSpecError
InvalidSpecError: application repo https://github.com/argoproj/argocd-example-apps is not permitted in project 'lab8'
Both errors mean the project is protecting you: first confirm intent, then decide whether to change the Application or the project.
argocd repo add https://github.com/<you>/does-not-exist-private --username x --password wrong; echo "exit=$?" argocd repo list | tail -2
The failed repo add does not save the repo; if your repo is public, GitHub also returns an authentication failure for a non-existent repo — this is GitHub deliberately not revealing whether private repos exist.
argocd app delete lab8-pb07 lab8-pb10 --yes --wait; kubectl delete ns lab8-pb07 --ignore-not-found
No verified video was found that specifically covers Ingress redirect loops, known_hosts, private CA and multi-source troubleshooting. $values Below is a 3-minute storyboard you can record yourself:
argocd login x509 reported, plus --insecure succeeds, explain how production should handle it.targetRevision to mian, a ComparisonError appears in the UI; git ls-remote and compare.app path does not exist; git ls-tree find the correct path.default namespace rejected by the project; show argocd proj get and InvalidSpecError.lookup); know which category ignoreDifferences,RespectIgnoreDifferences=true, and Server-Side Diff (default for SSA applications since 3.6) each solve.
Enter keywords (such as replicas,webhook,Too long,CRD,namespace,hook,in progress,Progressing,deadline,prune,shared,finalizer) to filter; click a row to jump to the details.
===== apps/Deployment podinfo-prod/podinfo ====== 150c150 < replicas: 7 --- > replicas: 3
Symptom: The application is always OutOfSync; with selfHeal enabled, Argo CD keeps changing the replica count back to 3, HPA scales it back up to 7, and Pods are created and deleted repeatedly; or Istio / Linkerd / a cloud vendor's mutating webhook injects a sidecar or annotations into the Pod template, so the diff never goes away.
Root cause: Git declares a field owned by another controller. The “single source of truth” in GitOps should only cover the fields you actually manage.
argocd app diff podinfo-prod # see exactly which field kubectl -n podinfo-prod get hpa kubectl -n podinfo-prod get deploy podinfo --show-managed-fields -o yaml | grep -B2 -A6 'manager: kube-controller-manager\|manager: argocd'
Preferred: remove from Git replicas (let HPA fully own it). When it cannot be removed (for example, the chart forces its output), use ignoreDifferences and also make sync respect it:
spec:
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers: [/spec/replicas]
# or ignore by field manager: managedFieldsManagers: [kube-controller-manager]
syncPolicy:
syncOptions:
- RespectIgnoreDifferences=true # otherwise sync still writes replicas back to 3
argocd-cm of resource.customizations.ignoreDifferences.<group_kind>, for example the caBundle injected by webhooks.ignoreDifferencesOnResourceUpdates), and by default ignores the status field of all resources — reducing pointless reconciliation.argocd_app_sync_total grows abnormally; that is the earliest alert signal (Lesson 7).l8_app pb13 apps/podinfo/overlays/dev --revision main --dest-namespace lab8-pb13 --sync-option CreateNamespace=true && argocd app sync lab8-pb13 kubectl -n lab8-pb13 scale deploy podinfo --replicas 4 # simulates HPA argocd app get lab8-pb13 --refresh | grep -E 'Sync Status|Deployment'
See Lesson 2 Module 6 ignoreDifferences,Lesson 7 Module 5 OutOfSync loops.
< cpu: "1" --- > cpu: 1000m … < protocol: TCP --- > (absent)
Symptom: Right after a successful sync it becomes OutOfSync again; the differences are only notation (quantity units,protocol: TCP such API Server defaults,null and empty maps), or fields filled in on CRDs by conversion / defaulting webhooks.
Root cause: Legacy diff approximates the API Server's behavior on the client with a three-way merge, so it cannot know server-side defaults, admission webhooks or CRD schema normalization. Server-Side Diff Sending an SSA dry-run to the API Server gives “what it would look like if applied now,” compared with the live object; this eliminates these false diffs at the root.
argocd app diff lab8-pb14
argocd app diff lab8-pb14 --server-side-diff # compare the results of both strategies (the CLI supports this flag; check argocd app diff --help)
kubectl -n argocd get application lab8-pb14 -o jsonpath='{.metadata.annotations.argocd\.argoproj\.io/compare-options}'
metadata:
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true # enable for a single application
# Global: controller.diff.server.side: "true" in argocd-cmd-params-cm
# Since v3.6, applications that enable the ServerSideApply=true sync option use Server-Side Diff automatically
In the short term you can also write values in Git in the same normalized form the API Server returns (cpu: "1" → write the live value).
one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes -Additional Info: This error usually means that you are trying to add a large resource on client side. Consider using Server-side apply or syncing with replace enabled. Note: Syncing with Replace enabled is potentially destructive as it may cause resource deletion and re-creation.
Source-verified util/argo/argo.go The AugmentSyncMsg (the message) when matched to metadata.annotations: Too long: must have at most 262144 bytes , the Additional Info above is appended; one or more objects failed to apply comes from gitops-engine/pkg/sync/sync_context.go. Wording may also differ across Kubernetes versions, for example may not be more than 262144 bytes (the Argo CD 3.3 upgrade notes cite this form).
Symptom: Sync fails when deploying kube-prometheus-stack, Argo CD itself (the ApplicationSet CRD is very large from 3.3 onward), or a large Grafana dashboard ConfigMap.
Root cause: Client-side apply writes the entire object into kubectl.kubernetes.io/last-applied-configuration an annotation, and all annotations combined must not exceed 256 KiB.
argocd app get lab8-pb15 --show-operation | sed -n '/Operation/,$p' | head -20 kubectl get crd prometheuses.monitoring.coreos.com -o json | jq '.metadata.annotations | to_entries | map(.value | length)'
spec:
syncPolicy:
syncOptions:
- ServerSideApply=true # SSA does not write the last-applied annotation; Argo CD adds resolve conflicts automatically
# For a single resource only: add the annotation argocd.argoproj.io/sync-options: ServerSideApply=true to that resource
ServerSideApply=true; when migrating from client-side apply, Argo CD performs a client-side apply migration (the term used in the upgrade notes: ClientSideApplyMigration), do not turn it off casually.Replace=true: for CRDs it means delete and recreate, which may cascade and delete all custom resource instances.See Lesson 2 Module 3 Sync options,Lesson 7 Module 7 Upgrades.
The Kubernetes API could not find monitoring.coreos.com/ServiceMonitor for requested resource lab8-pb16/podinfo. Make sure the "ServiceMonitor" CRD is installed on the destination cluster.
Source-verified AugmentSyncMsg: when the underlying message contains the server could not find the requested resource and the cluster has no such Kind, this text is output; if the Kind exists but the version differs, output The Kubernetes API could not find version "…" of … Version "…" of … is installed on the destination cluster.
Symptom: The application includes custom resources such as ServiceMonitor / Certificate / Rollout, but the target cluster does not yet have the corresponding operator; or the same application contains both a CRD and its CRs, and the dry-run fails on the first sync; or after a CRD version upgrade, the old v1alpha1 has been removed.
Root cause: Before syncing, Argo CD dry-runs all resources, and the dry-run requires the API Server to recognize the type. When a CRD and its CR are in the same sync, the CR's dry-run runs before the CRD is created.
kubectl --context kind-lab api-resources | grep -i servicemonitor || echo "CRD not installed" argocd app get lab8-pb16 --show-operation | grep -i 'could not find'
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true # add to the CR: skip the dry-run when the type does not exist
# Also use waves to ensure the CRD comes before the CR: the CRD's sync-wave is "-1", the CR's is "1"
# Better: deploy the operator and its CRDs as a separate "platform layer" application, ahead of business applications (order them with waves in App of Apps)
platform platform layer (CRDs, operators, cert-manager, monitoring stack) → business applications; ServiceMonitors in business charts are controlled by a values switch (serviceMonitor.enabled).kubectl api-resources and then change the version of the CR in Git apiVersion.one or more objects failed to apply, reason: namespaces "lab8-pb17" not found
Symptom: The first sync in a new environment fails; or someone manually deleted the namespace (taking all its resources with it), and it fails again after self-healing.
Root cause: Argo CD does not create destination.namespace namespaces by default. A namespace can be ① created by CreateNamespace=true ; ② part of the manifests (a Namespace object, which requires the project to allow the cluster-scoped Namespace resource, #37); ③ pre-created by the platform team.
kubectl get ns lab8-pb17 argocd app get lab8-pb17 -o json | jq '.spec.syncPolicy.syncOptions'
spec:
syncPolicy:
syncOptions: [CreateNamespace=true]
managedNamespaceMetadata: # when consistent labels are needed (for example Pod Security or network policy selectors)
labels: {pod-security.kubernetes.io/enforce: baseline, team: lab8}
CreateNamespace=true Namespaces created by will not be deleted when the application is deleted — this is an intentional safety design.l8_app pb17 lab8/pb07 && argocd app sync lab8-pb17; argocd app set lab8-pb17 --sync-option CreateNamespace=true && argocd app sync lab8-pb17
See Lesson 2 Module 3.
InvalidSpecError Namespace for podinfo apps/v1, Kind=Deployment is missing.
Source-verified controller/state.go: Namespace for %s %s is missing. (the second argument is the string form of the GVK, such as apps/v1, Kind=Deployment).
Symptom: The Application's destination.namespace is left empty (wanting the manifests to decide), but namespace-scoped resources in the manifests do not specify metadata.namespace.
Root cause: Argo CD only fills the destination.namespace for namespace-scoped resources that have no namespace; when neither side has one, the target cannot be determined.
argocd app get lab8-pb18 -o json | jq '.spec.destination' argocd app manifests lab8-pb18 | yq 'select(.metadata.namespace == null) | .kind + "/" + .metadata.name'
Set destination.namespace (recommended), or unify it in Kustomize namespace:.
namespace … is not permitted in project, #37).See Lesson 1 Module 4.
Operation: Sync Phase: Running Message: waiting for completion of hook batch/Job/db-migrate
Source-verified gitops-engine/pkg/sync/sync_context.go: waiting for %s %s/%s/%s, with the reason completion of hook / healthy state of / deletion of / pruning confirmation of, and with multiple tasks, append and %d more hooks|resources.
Symptom: The database migration Job in PreSync cannot pull its image (ImagePullBackOff), is waiting for a database connection, or backoffLimit is very large and keeps retrying; the sync stays here forever, and subsequent deployments are blocked too (#20).
Root cause: A hook Job only lets Argo CD proceed once it completes (succeeded or failed); if the Job itself has no timeout, it waits forever. Similarly, waiting for healthy state of apps/Deployment/podinfo means a resource in some wave has been unhealthy for a long time.
argocd app get lab8-pb19 --show-operation | grep -E 'Phase|Message' kubectl -n lab8-pb19 get job,pod -l job-name=db-migrate kubectl -n lab8-pb19 describe pod -l job-name=db-migrate | tail -15
argocd app terminate-op lab8-pb19 # first terminate the stuck operation # after fixing the Job manifest, sync again
apiVersion: batch/v1
kind: Job
metadata:
name: db-migrate
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation # delete the old Job before the next sync, to avoid "already exists"
spec:
activeDeadlineSeconds: 600 # hooks must have a timeout
backoffLimit: 2
activeDeadlineSeconds and a small backoffLimit; use SyncFail hooks to send alerts or clean up.mkdir -p ~/gitops-lab/lab8/pb19 && cat > ~/gitops-lab/lab8/pb19/hook.yaml <<'EOF'
apiVersion: batch/v1
kind: Job
metadata: {name: db-migrate, annotations: {argocd.argoproj.io/hook: PreSync, argocd.argoproj.io/hook-delete-policy: BeforeHookCreation}}
spec:
template:
spec:
restartPolicy: Never
containers: [{name: m, image: busybox:1.37, command: [sh, -c, "echo waiting for db; sleep 3600"]}]
EOF
cp ~/gitops-lab/lab8/pb07/cm.yaml ~/gitops-lab/lab8/pb19/ && cd ~/gitops-lab && git add lab8 && git commit -qm "lab8: pb19" && git push -q
l8_app pb19 lab8/pb19 --sync-option CreateNamespace=true && argocd app sync lab8-pb19 --async; sleep 10; l8_why pb19 | grep -i message
$ argocd app sync lab8-pb19 FATA[0000] rpc error: code = FailedPrecondition desc = another operation is already in progress
Source-verified util/argo/argo.go: ErrAnotherOperationInProgress = status.Errorf(codes.FailedPrecondition, "another operation is already in progress").
Symptom: In the CI pipeline, the argocd app sync step fails; or manual sync fails when auto-sync is enabled; often happens together with the stuck hook in #19.
Root cause: Each Application can run only one operation at a time (.operation field). While the previous operation is still Running (waiting for hooks, waiting for health, or in retry backoff), new sync requests are rejected.
kubectl -n argocd get application lab8-pb19 -o jsonpath='{.status.operationState.phase}{" "}{.status.operationState.message}{"\n"}'
kubectl -n argocd get application lab8-pb19 -o jsonpath='{.operation}'; echo
argocd app terminate-op lab8-pb19 argocd app wait lab8-pb19 --operation --timeout 60 && argocd app sync lab8-pb19
sync for applications with auto-sync enabled: only change Git, then argocd app wait.syncPolicy.retry.limit,backoff) must have a limit; otherwise a failing sync holds the operation lock for a long time, with messages like … Retrying attempt #3 at 10:21AM. (in the source it is %s. Retrying attempt #%d at %s.).GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
Service lab8-pb21 podinfo Synced Progressing
networking.k8s.io Ingress lab8-pb21 podinfo Synced Progressing
Source-verified gitops-engine/pkg/health/health_ingress.go and health_service.go: the Ingress's status.loadBalancer.ingress is empty, or a LoadBalancer-type Service has no address assigned, and the health status is Progressing.
Symptom: The application syncs successfully and all Pods are Running, but the application health is stuck at Progressing forever; subsequent waves that depend on health, PostSync hooks, the next RollingSync step, and Rollouts are all waiting.
Root cause: kind has no LoadBalancer implementation by default; the Ingress controller did not write back an address (not installed, IngressClass mismatch, or publish-service not enabled on the controller). This is not an Argo CD bug, but the real state of “no address assigned.”
kubectl -n lab8-pb21 get svc,ingress -o wide kubectl get ingressclass argocd app get lab8-pb21 | grep Progressing
ClusterIP + port-forward, or install cloud-provider-kind / MetalLB to assign addresses; enable address write-back on the Ingress controller.resource.customizations.health.networking.k8s.io_Ingress), but be aware that this masks real failures.partition rolling update also shows Progressing.apps Deployment podinfo-dev podinfo Synced Degraded Deployment "podinfo" exceeded its progress deadline
Source-verified health_deployment.go: Deployment %q exceeded its progress deadline; in progress it is Waiting for rollout to finish: %d out of %d new replicas have been updated... , etc.
Symptom: CI changed the image tag to a version that does not exist (or an arm64 node pulls an amd64 image); auto-sync succeeded (Synced), and 10 minutes later the application became Degraded; the old ReplicaSet is still serving (protection from the rolling update), but all subsequent deployments are based on a bad desired state.
Root cause: Sync only guarantees that “the object has been written to the API Server,” not that “the new version runs.” The health check relies on the Deployment's progressDeadlineSeconds (default 600 seconds) to report Degraded.
argocd app get podinfo-dev | grep -E 'Degraded|Progressing' kubectl -n podinfo-dev get rs,pod -l app.kubernetes.io/name=podinfo kubectl -n podinfo-dev describe pod -l app.kubernetes.io/name=podinfo | grep -A3 -E 'Failed|BackOff'
cd ~/gitops-lab && git revert --no-edit HEAD && git push # rollback in GitOps = roll back Git # Emergency: argocd app rollback requires auto-sync to be turned off first; otherwise the next reconciliation syncs the bad version again
crane manifest,docker buildx imagetools inspect), and uses only immutable tags or digests.on-health-degraded triggers to alert (#47).See Lesson 1 Module 5 State model,Lesson 6 Module 2 Rollouts.
GROUP KIND NAMESPACE NAME STATUS HEALTH HOOK MESSAGE
ConfigMap lab8-pb23 old-flags OutOfSync Missing ignored (requires pruning)
Symptom: After a refactor, a ConfigMap / CronJob was deleted but is still running in the cluster (for example, the old CronJob keeps running jobs); the application stays OutOfSync.
Root cause: Pruning is off by default: auto-sync requires syncPolicy.automated.prune: true, and manual sync requires --prune. In addition, argocd.argoproj.io/sync-options: Prune=false annotations permanently retain a resource,Prune=confirm require manual confirmation (the sync stops at waiting for pruning confirmation of …). If a resource's tracking information is lost (the first sync after switching tracking methods from v2 to v3 deletes the resource, #50), Argo CD cannot recognize it either.
argocd app resources lab8-pb23 --orphaned=false | grep -i prun
kubectl -n lab8-pb23 get cm old-flags -o jsonpath='{.metadata.annotations}'; echo
argocd app get lab8-pb23 -o json | jq '.spec.syncPolicy'
argocd app sync lab8-pb23 --prune # Automatic: syncPolicy.automated.prune: true; for critical resources (Namespace, PVC) keep Prune=false or Prune=confirm
argocd app diff; for stateful resources (PVC, database CRs) add Prune=false / Delete=false (interview Q42).PruneLast=true so that pruning happens after all waves, avoiding a brief outage caused by deleting old resources first.orphanedResources.warn: true) to find resources that “no application manages.”SharedResourceWarning ConfigMap/app-config is part of applications argocd/podinfo-staging and podinfo-dev
Source-verified controller/state.go: %s/%s is part of applications %s and %s; when FailOnSharedResource=true is enabled, the sync fails with the message prefix Shared resource found: (controller/sync.go).
Symptom: Two applications render resources with the same name and namespace (a copy-pasted overlay forgot to change namespace / namePrefix; two charts both create the same ClusterRole); the two applications take turns “fighting” over the resource — after one syncs, the other becomes OutOfSync, and deleting one application may even delete the other's resources.
Root cause: Each resource can have only one tracking-id; the application synced later rewrites the tracking annotation, and the earlier application treats it as “needs repair” or “not mine.”
kubectl -n podinfo-dev get cm app-config -o jsonpath='{.metadata.annotations.argocd\.argoproj\.io/tracking-id}'; echo
argocd app manifests podinfo-staging | yq 'select(.kind=="ConfigMap") | .metadata.namespace + "/" + .metadata.name'
Make each resource belong to only one application: correct the overlay's namespace/namePrefix; move cluster-level shared resources into a platform application. Then sync the two applications separately.
FailOnSharedResource=true, so conflicts become explicit failures.DeletionError Unable to delete application resources: …
Source-verified controller/appcontroller.go: Unable to delete application resources: %v; the finalizer name is resources-finalizer.argocd.argoproj.io (application_defaults.go).
Symptom:argocd app delete Afterwards the application keeps existing,metadata.deletionTimestamp is set; common causes: the target cluster is unreachable (the cluster was deleted), a child resource is stuck on its own finalizer (for example PVC kubernetes.io/pvc-protection, cert-manager, or cloud LB controllers), the AppProject has been deleted, or the controller lacks permission to delete some resource type.
Root cause: An application with resources-finalizer, when deleted, will cascade-delete all managed resources, and removes the finalizer only after every one has been deleted successfully. If any single resource cannot be deleted, the application stays in Deleting.
kubectl -n argocd get application lab8-pb25 -o jsonpath='{.metadata.finalizers}{"\n"}{.metadata.deletionTimestamp}{"\n"}'
l8_why pb25 | grep -i deletion
argocd app resources lab8-pb25
kubectl -n lab8-pb25 get all,pvc -o name; kubectl get ns lab8-pb25 -o jsonpath='{.status.conditions}'
kubectl -n argocd patch application lab8-pb25 --type json -p '[{"op":"remove","path":"/metadata/finalizers"}]'— this leaves orphaned resources behind, which must be recorded and cleaned up.argocd app delete APP --cascade=false.l8_app pb25 lab8/pb07 --sync-option CreateNamespace=true && argocd app sync lab8-pb25
kubectl -n lab8-pb25 patch cm pb07 --type merge -p '{"metadata":{"finalizers":["example.com/block"]}}'
argocd app delete lab8-pb25 --yes &; sleep 10; kubectl -n argocd get application lab8-pb25 -o jsonpath='{.metadata.deletionTimestamp}'; echo
kubectl -n lab8-pb25 patch cm pb07 --type json -p '[{"op":"remove","path":"/metadata/finalizers"}]' # unblock; deletion completes
See Lesson 7 Module 6 Stuck deletion, finalizers and orphaned resources.
Choose a scenario, click “Run,” and observe how a sync progresses through PreSync → wave -1 → wave 0 → wave 1 → PostSync, where it stops, and what the operation message is (the message format is taken from v3.6.1's sync_context.go, resource names are examples).
apps/podinfo/overlays/dev exists in main. Output is an example.l8_app pb13 apps/podinfo/overlays/dev --revision main --dest-namespace lab8-pb13 --sync-option CreateNamespace=true argocd app sync lab8-pb13 && kubectl -n lab8-pb13 scale deploy podinfo --replicas 4 argocd app get lab8-pb13 --refresh | grep -E '^Sync Status|Deployment'
Sync Status: OutOfSync from main (…) apps Deployment lab8-pb13 podinfo OutOfSync Healthy
kubectl -n argocd patch application lab8-pb13 --type merge -p '{"spec":{"ignoreDifferences":[{"group":"apps","kind":"Deployment","jsonPointers":["/spec/replicas"]}]}}'
argocd app get lab8-pb13 --refresh | grep -E '^Sync Status'Sync Status: Synced to main (…)
lab8/pb19 and sync asynchronously, then:argocd app sync lab8-pb19; argocd app get lab8-pb19 --show-operation | grep -E 'Phase|Message'
FATA[0000] rpc error: code = FailedPrecondition desc = another operation is already in progress Phase: Running Message: waiting for completion of hook batch/Job/db-migrate
argocd app terminate-op lab8-pb19 sed -i 's/sleep 3600/echo migrated/' ~/gitops-lab/lab8/pb19/hook.yaml && cd ~/gitops-lab && git commit -qam "lab8: pb19 fix" && git push -q argocd app sync lab8-pb19 && argocd app wait lab8-pb19 --health --timeout 120
deletionTimestamp is set while the application still exists; after removing the child resource's finalizer, deletion completes.l8_clean
No verified video was found that specifically covers Server-Side Diff, annotations too long, or stuck finalizer deletion. Storyboard:
kubectl scale Create drift → OutOfSync; after adding ignoreDifferences + RespectIgnoreDifferences it becomes Synced.waiting for completion of hook; a re-sync is rejected; terminate-op.deletionTimestamp and DeletionError; after removing it, deletion completes.goTemplate: true + missingkey=error) → validate (duplicate names, project exists, target cluster exists) → according to the applicationsSync policy, create / update / delete Applications. AppSet errors are written to the AppSet's status.conditions, not on the Application.
argocd appset generate (preview without applying),argocd appset get, and applicationset-controller logs to locate generation problems; be able to explain why deleting an AppSet by default deletes all the Applications it generated and their resources.
scopes) → g policy maps roles → p policy matching (resource, action, project/object) → deny first → if nothing matches, falls back to policy.default; and be able to read permission denied: applications, sync, team-a/podinfo-dev, sub: …, iat: ….
Enter keywords (such as duplicate,template,deleted,3 minutes,project,cluster,127.0.0.1,permission denied,groups,logs,update/*,Namespace,sourceNamespaces) to filter; click a row to jump to the details.
$ argocd appset get podinfo | sed -n '/CONDITION/,$p' CONDITION TYPE STATUS MESSAGE ErrorOccurred … True ApplicationSet podinfo contains applications with duplicate name: podinfo ResourcesUpToDate … False …
Source-verified applicationset/controllers/applicationset_controller.go: ApplicationSet %s contains applications with duplicate name: %s; the same place also has … contains an application with no name; a name must be set in the template's metadata.name or via a templatePatch (generateName is not supported).
Symptom: In a Matrix generator (cluster × environment), the template name only uses {{.name}}; or a List generator has an extra duplicate element. The whole AppSet stops updating —other normal Applications also stop being updated.
Root cause: Application names must be unique within the Argo CD namespace; the template name must be composed of fields that distinguish each set of parameters.
argocd appset generate ~/gitops-lab/argocd/appsets/podinfo.yaml -o json | jq -r '.[].metadata.name' | sort | uniq -d kubectl -n argocd logs deploy/argocd-applicationset-controller --tail=50 | grep -i duplicate
template:
metadata:
name: 'podinfo-{{.env}}-{{.name}}' # environment + cluster, guarantees uniqueness (goTemplate syntax)
argocd appset generate (requires connecting to Argo CD; a rendering script can be used offline), and check that names are unique and at most 63 characters long (names are often also used as label values).<app>-<env>-<cluster>.See Lesson 3 Module 3 ApplicationSet controller and templates,Module 5 Matrix and Merge.
ErrorOccurred failed to execute go template podinfo-{{.path.basenamee}}: template: :1:19: executing "" at <.path.basenamee>: map has no entry for key "basenamee"
Source-verified applicationset/utils/utils.go: failed to execute go template %s: %w; and the source uniformly adds missingkey=error (around line 357 of the same file), so misspelled keys produce an error instead of silently rendering as empty.
Symptom: When migrating from the old fasttemplate syntax ({{path.basename}}) to goTemplate ({{.path.basename}}), a typo is made; or in the JSON/YAML file of the Git file generator, one environment is missing a key.
Root cause: In goTemplate mode, parameters are nested maps; accessing a non-existent key fails when missingkey=error is evaluated. If goTemplate is not enabled, the old template engine leaves unknown placeholders as they are, so the generated name contains {{…}} and produces a strange Application.
argocd appset generate ~/gitops-lab/argocd/appsets/podinfo.yaml -o yaml | head -30 argocd appset get podinfo -o json | jq '.status.conditions'
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
template:
metadata:
name: 'podinfo-{{.path.basename}}'
spec:
source:
helm:
values: |
replicas: {{ default 1 .replicas }} # use default (a Sprig function) for optional keys
default/hasKey, and do not rely on “a missing key is empty.”{{ .Values.x }}) conflicts with AppSet's goTemplate: keep Helm templates inside the chart, do not inline them in the AppSet's values, and when necessary use {{`{{ … }}`}} to escape.See Lesson 3 Module 3.
applicationset.argoproj.io "podinfo" deleted application.argoproj.io/podinfo-prod-lab deleted application.argoproj.io/podinfo-prod-lab2 deleted (the Deployment and Service in the podinfo-prod namespace are then cascade-deleted)
Official docs An Application with resources-finalizer.argocd.argoproj.io deletion cascades; an ApplicationSet setting .syncPolicy.preserveResourcesOnDeletion: true can keep deployed resources when the AppSet is deleted.
Symptom: When refactoring directories, an AppSet was moved from argocd/appsets/ to elsewhere, and the root app pruned it; or the path wildcard of the Git directory generator was written wrong, so the generator returns an empty list — the AppSet concludes “these Applications are no longer needed” and deletes them all.
Root cause: The AppSet is the “owner” of its Applications (ownerReference); the default policy sync allows create, update and delete; Applications carry a resource finalizer by default, so deletion cascades all the way to the workloads.
kubectl -n argocd get applicationset podinfo -o jsonpath='{.spec.syncPolicy}'; echo
kubectl -n argocd get application -l app.kubernetes.io/instance=podinfo 2>/dev/null | head # depends on your labels
argocd appset generate ~/gitops-lab/argocd/appsets/podinfo.yaml -o json | jq length # whether the generator returns 0 items
Restore from Git (git revert) and the root app recreates the AppSet; workloads are resynced (stateful data relies on backups). Long-term configuration:
spec:
syncPolicy:
applicationsSync: create-update # do not delete Applications (create-only / create-update / create-delete / sync)
preserveResourcesOnDeletion: true # do not cascade-delete resources when the AppSet is deleted
# Global: applicationsetcontroller.policy: create-update in argocd-cmd-params-cm
create-update + preserveResourcesOnDeletion: true; deleting an environment goes through a separate review process.argocd/appsets/ directories turns off automatic prune, or add to the AppSet argocd.argoproj.io/sync-options: Prune=false.podinfo-dev/staging/prod to ApplicationSet podinfo (argocd/appsets/podinfo.yaml, project platform,preserveResourcesOnDeletion: true, generated apps have no finalizer) — if old Applications carry resources-finalizer, deleting them cascades to delete running workloads — first delete non-cascading (argocd app delete APP --cascade=false) or first remove the finalizer, then let the AppSet take over applications with the same name.git push a new directory apps/podinfo/overlays/qa → podinfo-qa does not appear in argocd app list for a long time
Official docs The Git generator polls by default every requeueAfterSeconds (default 3 minutes, i.e. 180 seconds); configuring a webhook can eliminate the delay.
Symptom: Developers think “it didn't take effect” after pushing and keep pushing empty commits; with the PR generator, preview environments are slower (SCM API polling, also affected by rate limiting).
Root cause: The ApplicationSet controller and the Application controller each poll: the AppSet generator discovers the new directory → creates the Application → the Application controller fetches and compares in the next reconciliation cycle (timeout.reconciliation default 120 seconds, plus up to 60 seconds of jitter). Combined, the two can add up to several minutes.
kubectl -n argocd get applicationset podinfo -o jsonpath='{.spec.generators[0].git.requeueAfterSeconds}'; echo
kubectl -n argocd logs deploy/argocd-applicationset-controller --since=10m | grep -iE 'webhook|generated'
kubectl -n argocd get secret argocd-secret -o jsonpath='{.data}' | jq 'keys | map(select(startswith("webhook")))'
https://argocd.example.com/api/webhook (Application refresh) and the webhook endpoint of the ApplicationSet controller, and in argocd-secret set webhook.github.secret.requeueAfterSeconds, and evaluate the impact on Git server / API rate limits (#49).argocd app get --refresh self-service commands.See Lesson 3 Module 4 Generators,Lesson 7 Module 3 Repo Server.
ErrorOccurred application references project team-c which does not exist
Source-verified applicationset_controller.go: application references project %s which does not exist. An Application created directly that references a non-existent project also gets an InvalidSpecError (different wording; check actual output).
Symptom: When a new team onboards, the AppSet syncs before the AppProject; or the project file was renamed but metadata.name unchanged; or project the field is a template parameter whose argument is missing (it renders as an empty string).
Root cause: An Application must belong to an existing AppProject; the project is the prerequisite for all validation.
argocd proj list argocd appset generate ~/gitops-lab/argocd/appsets/teams.yaml -o json | jq -r '.[].spec.project' | sort -u
In App of Apps, use a wave so that the project comes before the AppSet: argocd/projects/*.yaml add argocd.argoproj.io/sync-wave: "-1"; or the project and AppSet are generated together from the same “team bootstrap” template.
InvalidSpecError … there are no clusters with this name: lab2
Source-verified util/argo/argo.go: there are no clusters with this name: %s; in an AppSet it is wrapped as application destination spec is invalid: ….
Symptom:destination.name: lab2 Applications for argocd cluster list are invalid; the name actually displayed is kind-lab2 (argocd cluster add by default uses the kubeconfig context name); or the cluster Secret was not restored in the new Argo CD instance.
Root cause:destination.name Matching by the name field in the cluster Secret is exact; destination.server matching by URL. Only one of the two may be used.
argocd cluster list
kubectl -n argocd get secret -l argocd.argoproj.io/secret-type=cluster -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.data.name}{"\n"}{end}' | while read s n; do echo "$s $(echo "$n" | base64 -d)"; done
argocd cluster set kind-lab2 --name lab2 # or specify it at registration: argocd cluster add kind-lab2 --name lab2
argocd.argoproj.io/secret-type: cluster, key name/server/config) is managed by Git + a secrets tool, and names follow a platform convention (lab2,prod-eu-1).env: prod), do not rely on string matching of cluster names.in-cluster) by default has no cluster Secret, so no Cluster generator with a label selector will select it (official Generators-Cluster docs); when needed, declaratively create an in-cluster cluster Secret and add labels.See Lesson 4 Module 5 Registering clusters and declarative cluster Secrets.
$ argocd cluster list SERVER NAME VERSION STATUS MESSAGE https://127.0.0.1:41893 lab2 Unknown … dial tcp 127.0.0.1:41893: connect: connection refused
Symptom: Registering the kind cluster with kubeconfig lab2, the CLI succeeds, but all applications deploying to lab2 are Unknown. Similar real-world production issues: the kubeconfig uses an API address reachable only from the office network, a private cluster's API endpoint, or traffic blocked by a firewall.
Root cause: The API address kind writes into the host kubeconfig is 127.0.0.1:random port (a port mapping on the host). In lab the cluster, argocd-application-controller runs and accesses 127.0.0.1 — which is its own Pod. The two kind clusters are on the same Docker network kind , so the internal address should be used https://lab2-control-plane:6443.
kind get kubeconfig --name lab2 --internal | grep server kubectl -n argocd exec sts/argocd-application-controller -- sh -c 'getent hosts lab2-control-plane || true' argocd admin cluster stats -n argocd 2>/dev/null | head
server: https://lab2-control-plane:6443
kind get kubeconfig --name lab2 --internal > /tmp/lab2-internal.kubeconfig argocd cluster rm https://127.0.0.1:41893 argocd cluster add kind-lab2 --name lab2 --cluster-endpoint kube-public --yes # Lesson 4 approach: use the cluster-info address in the kube-public namespace # or: argocd cluster add kind-lab2 --name lab2 --kubeconfig /tmp/lab2-internal.kubeconfig --yes # If the local CLI cannot resolve lab2-control-plane: switch to a declarative cluster Secret, with the internal address in server and the argocd-manager ServiceAccount's token and CA from lab2 in config
argocd_cluster_connection_status.argocd cluster add creates in the target cluster argocd-manager a ServiceAccount and grants cluster-admin by default (interview Q30 discusses least privilege).See Lesson 4 Module 5,the Kubernetes course(kind networking).
$ argocd app sync podinfo-dev FATA[0000] rpc error: code = PermissionDenied desc = permission denied: applications, sync, team-a/podinfo-dev, sub: alice, iat: 2026-11-17T02:10:44Z
Source-verified util/rbac/rbac.go of EnforceErr: permission denied + : + resource, action, object, then append sub: <user identifier> and iat: <RFC3339>. Note: for an application that does not exist or that the user is not allowed to view, the API also uniformly returns permission denied, so as not to reveal whether the application exists (server/application/application.go comment).
Symptom: Developers can see the application but cannot sync; or CI's project token suddenly stops working; or a user was just added to a group but permissions do not change (the groups in the JWT are not refreshed until the next login —iat that is a troubleshooting clue).
Root cause: Casbin decision: subject (user / group / project role) → role → p, role, resource, action, project/object, allow|deny. If no allow matches, the request is denied; if a deny matches, deny takes precedence.
argocd account get-user-info # current identity and groups
argocd account can-i sync applications 'team-a/podinfo-dev'
argocd admin settings rbac can alice sync applications 'team-a/podinfo-dev' --namespace argocd # offline check by an administrator
kubectl -n argocd get cm argocd-rbac-cm -o jsonpath='{.data.policy\.csv}'
Logged In: true Username: alice Groups: devs no
data:
policy.default: role:readonly
scopes: '[groups, email]'
policy.csv: |
p, role:team-a-dev, applications, get, team-a/*, allow
p, role:team-a-dev, applications, sync, team-a/*, allow
p, role:team-a-dev, logs, get, team-a/*, allow
g, team-a-devs, role:team-a-dev
argocd admin settings rbac validate and a set of rbac can assertions (who can, who cannot).roles (managed with the project); global policy.csv should hold only platform roles.Logged In: true Username: alice@example.com Issuer: https://argocd.example.com/api/dex Groups:
Official docs v3.0 upgrade notes: when using Dex SSO, policies based on Dex sub claims no longer apply; they should be changed to be based on federated_claims.user_id.
Symptom: UI login succeeds, but the application list is empty; policy.csv the one written in g, my-org:team-a, role:team-a-dev, but it does not take effect; after upgrading to v3, some policies written for users stop working.
Root cause:① the IdP does not return groups in the token (Entra ID needs the groups claim configured in the app registration, and large groups may return an “overage” reference instead of a list; Okta needs the groups scope); ②argocd-rbac-cm the scopes does not include groups (default [groups], someone changed it to [email]); ③ group name formats differ (the GitHub connector uses org:team, Entra uses object IDs); ④ changes to Dex user identifiers in v3.
argocd account get-user-info
kubectl -n argocd get cm argocd-rbac-cm -o jsonpath='{.data.scopes}'; echo
kubectl -n argocd logs deploy/argocd-dex-server --tail=50 | grep -iE 'group|claim|error'
kubectl -n argocd logs deploy/argocd-server --tail=50 | grep -i 'permission denied'
First have the IdP return groups and use get-user-info to see them, then, based on what is seen,exact string write g rules; when authorizing individuals, use the identifier recommended for v3. Do not use policy.default: role:admin as a means of “fixing the problem first.”
permission denied: logs, get, team-a/podinfo-dev, sub: alice, iat: …
Official docs v2.14 → 3.0 upgrade notes: server.rbac.log.enforce.enable has been removed, and log RBAC is enforced by default; users without an explicit logs, get permission cannot see the logs tab. Users who have not set policy.default, and have not enabled that flag, are affected.
Symptom: After the upgrade, developers report that the “logs button is gone”; on call, they cannot view logs through Argo CD.
Root cause: In v2, applications, get implicitly granted logs permission; in v3, logs is a separate resource.
argocd account can-i get logs 'team-a/*'
kubectl -n argocd get cm argocd-cm -o jsonpath='{.data.server\.rbac\.log\.enforce\.enable}'; echo
p, role:team-a-dev, logs, get, team-a/*, allow # recommended: add per role (least privilege) # quick but broad: p, role:global-log-viewer, logs, get, */*, allow + policy.default: role:global-log-viewer
permission denied: applications, delete/Pod/podinfo-dev/podinfo-7d9c…, team-a/podinfo-dev, sub: alice, iat: …
Official docs v3.0 upgrade notes: update/delete applies only to the Application itself; to grant operations on managed resources, add new update/*,delete/* policies; you can set server.rbac.disableApplicationFineGrainedRBACInheritance: "false" to restore v2 behavior. RBAC docs example: p, example-user, applications, delete/*/Pod/*/*, default/prod-app, allow.
Symptom: An on-call engineer clicks “Delete Pod” in the UI to have it recreated and is denied; or running the resource action (restart) fails.
Root cause: v3 authorizes “modifying the Application” and “modifying the resources it manages” separately, to prevent people with application edit rights from deleting cluster resources at will.
argocd admin settings rbac can alice 'delete/*/Pod/*/*' applications 'team-a/podinfo-dev' --namespace argocd
kubectl -n argocd get cm argocd-cm -o jsonpath='{.data.server\.rbac\.disableApplicationFineGrainedRBACInheritance}'; echo
p, role:team-a-oncall, applications, delete/*/Pod/*/*, team-a/*, allow # allow deleting Pods only p, role:team-a-oncall, applications, action/apps/Deployment/restart, team-a/*, allow
update/*./ as a separator,delete/*/Pod/* so such patterns may match more broadly than you expect; be especially careful with deny rules.See Lesson 4 Module 3.
one or more synchronization tasks are not valid … resource :Namespace is not permitted in project team-a … namespace kube-system is not permitted in project 'team-a'
Source-verified controller/sync.go: resource %s:%s is not permitted in project %s (the core group is empty, so it is shown as :Namespace),namespace %v is not permitted in project '%s'; one or more synchronization tasks are not valid comes from sync_context.go.
Symptom: The team's chart includes Namespace, ClusterRole, CRD or ValidatingWebhookConfiguration; or the manifests hard-code namespace: kube-system. The sync fails as a whole during validation,and not a single resource is applied.
Root cause: When the project's clusterResourceWhitelist is empty, all cluster-scoped resources are forbidden; namespaceResourceBlacklist/Whitelist governs namespace-scoped kinds; explicit namespaces in the manifests must likewise pass the destinations check.
argocd proj get team-a | grep -iE 'cluster|namespace' argocd app manifests podinfo-dev | yq 'select(.metadata.namespace == null) | .kind' | sort | uniq -c
Move cluster-level resources into a platform application (platform project); the team's chart disables creating Namespace / CRD via values. When truly needed, the platform team grants exactly what is required:
spec:
clusterResourceWhitelist:
- {group: '', kind: Namespace} # allow only the kinds needed; do not use {group: '*', kind: '*'}
mkdir -p ~/gitops-lab/lab8/pb37 && kubectl create ns lab8-pb37-extra --dry-run=client -o yaml > ~/gitops-lab/lab8/pb37/ns.yaml cd ~/gitops-lab && git add lab8 && git commit -qm "lab8: pb37" && git push -q l8_app pb37 lab8/pb37 --sync-option CreateNamespace=true && argocd app sync lab8-pb37; l8_why pb37 | grep -i permitted
See Lesson 4 Module 2 Sources, destinations and cluster resource allowlist.
application 'podinfo-dev' in namespace 'team-a' is not permitted to use project 'team-a'
Source-verified util/argo/argo.go: application '%s' in namespace '%s' is not permitted to use project '%s'.
Symptom: To let teams self-serve, an Application is placed in the team's own namespace team-a : either it is not reconciled at all (not visible in the UI), or the error above is reported.
Root cause: Two layers of allowance are needed: ① the control plane allows these namespaces: argocd-cmd-params-cm in application.namespaces: team-a, team-b (both server and application-controller must be restarted to take effect); ② the project allows Applications from these namespaces: the AppProject's spec.sourceNamespaces: [team-a]. If layer ① is missing, the application is ignored; if layer ② is missing, this error is reported.
kubectl -n argocd get cm argocd-cmd-params-cm -o jsonpath='{.data.application\.namespaces}'; echo
kubectl -n argocd get appproject team-a -o jsonpath='{.spec.sourceNamespaces}'; echo
argocd app list -A 2>/dev/null | head || argocd app list --app-namespace team-a
configs: # Helm values
params:
application.namespaces: "team-a, team-b"
# AppProject team-a:
# spec:
# sourceNamespaces: [team-a]
default project into sourceNamespaces.project/namespace/application (such as team-a/team-a/podinfo-dev), and policies must be adjusted accordingly.Choose a request, click “Evaluate,” and step through “subject and groups → role → policy match → deny first → default role.” The policies come from the examples below Figure 3-1 on this page policy.csv (the rule format matches the Argo CD RBAC docs; the evaluation process is simplified for teaching; for complex globs, defer to argocd admin settings rbac can for the authoritative behavior).
policy.default: role:readonly p, role:team-a-dev, applications, get, team-a/*, allow p, role:team-a-dev, applications, sync, team-a/*, allow p, role:team-a-dev, logs, get, team-a/*, allow p, role:team-a-dev, applications, sync, team-a/podinfo-prod, deny p, role:team-a-oncall, applications, delete/*/Pod/*/*, team-a/*, allow g, team-a-devs, role:team-a-dev g, team-a-oncall, role:team-a-oncall
lab2; Lab 3-C modifies argocd-cm / argocd-rbac-cm— back up first. Output is an example.cat > /tmp/pb26.yaml <<'EOF'
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata: {name: lab8-pb26, namespace: argocd}
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- list:
elements: [{env: a}, {env: b}]
template:
metadata: {name: 'lab8-pb26', labels: {lab8: "true"}}
spec:
project: lab8
source: {repoURL: 'https://github.com/<you>/gitops-lab', targetRevision: lab8, path: lab8/pb07}
destination: {server: https://kubernetes.default.svc, namespace: 'lab8-pb26-{{.env}}'}
EOF
argocd appset generate /tmp/pb26.yaml -o json | jq -r '.[].metadata.name'lab8-pb26 lab8-pb26
kubectl apply -f /tmp/pb26.yaml; sleep 5
kubectl -n argocd get applicationset lab8-pb26 -o jsonpath='{range .status.conditions[*]}{.type}={.message}{"\n"}{end}' | grep -i duplicateErrorOccurred=ApplicationSet lab8-pb26 contains applications with duplicate name: lab8-pb26
'lab8-pb26-{{.env}}' and re-apply; then change it to {{.envv}} observe the failed to execute go template. Finally, kubectl -n argocd delete applicationset lab8-pb26, observe the Applications it generated being deleted (#28).argocd cluster add kind-lab2 --yes 2>&1 | tail -1 # using the host kubeconfig (127.0.0.1) sleep 20; argocd cluster list
SERVER NAME VERSION STATUS MESSAGE https://127.0.0.1:41893 kind-lab2 Unknown … connection refused
argocd cluster rm https://127.0.0.1:41893 --yes 2>/dev/null || argocd cluster rm https://127.0.0.1:41893 argocd cluster add kind-lab2 --name lab2 --cluster-endpoint kube-public --yes # consistent with Lesson 4 (--cluster-endpoint can be kubeconfig / kube-public / internal) argocd cluster list
kind's kube-public/cluster-info records the API address inside the container network (https://lab2-control-plane:6443, check actual output). You can also register with the kind get kubeconfig --name lab2 --internal generated kubeconfig, or use the declarative cluster Secret from Lesson 4. When done, applications such as podinfo are placed in the project according to the Lesson 4 convention platform, and team applications are in team-a / team-b.
kubectl -n argocd patch cm argocd-cm --type merge -p '{"data":{"accounts.alice":"login"}}'
argocd account update-password --account alice --new-password 'Alice-Lab8!' --current-password "$ADMIN_PASS"
kubectl -n argocd patch cm argocd-rbac-cm --type merge -p '{"data":{"policy.csv":"p, alice, applications, get, lab8/*, allow\n"}}'
argocd admin settings rbac can alice sync applications 'lab8/lab8-pb07' --namespace argocd
argocd admin settings rbac can alice get logs 'lab8/lab8-pb07' --namespace argocdNo No
kubectl apply -f ~/lab8-cm-backup.yaml; l8_clean
Third-party videos may be based on v2 (for example, they do not cover v3's log RBAC and fine-grained permissions); defer to this lesson and the official docs. No verified video was found that specifically covers kind multi-cluster networking and troubleshooting Applications in any namespace; storyboard:
argocd appset generate Output two same-name applications; after apply, the AppSet's ErrorOccurred.argocd cluster list Show that 127.0.0.1 is unreachable; kind get kubeconfig --internal re-register.rbac can Verify item by item; after adding logs, get the logs tab appears in the UI.ARGOCD_EXEC_TIMEOUT (default 90 seconds), the controller's wait for repo-server's controller.repo.server.timeout.seconds (default 60 seconds), and render failures get cached (Manifest generation error (cached)).
controller.status.processors (default 20),controller.operation.processors (default 10),controller.kubectl.parallelism.limit (default 20), sharding algorithm (default legacy),timeout.reconciliation (default 120 seconds + 60 seconds jitter), and the key changes when upgrading to v3 / 3.3 / 3.5 / 3.6.
Enter keywords (such as decrypt,already exists,SecretSyncedError,plugin,cached,deadline,sync window,Paused,Image Updater,notification,OOM,rate limit,upgrade) to filter; click a row to jump to the details.
$ kubectl -n podinfo-prod describe sealedsecret db-cred | tail -3 Events: Type Reason Age From Message Warning ErrUnsealFailed 12s sealed-secrets Failed to unseal: no key could decrypt secret (password)
Official source Sealed Secrets v0.41.2: event reason ErrUnsealFailed, message Failed to unseal: %v, inner no key could decrypt secret (pkg/crypto/crypto.go).
Symptom: In Argo CD the SealedSecret shows Synced, but the corresponding Secret does not exist (or has not been updated), and Pods that depend on it report secret "db-cred" not found; common causes: ① encrypted in the dev cluster with the dev certificate and copied to prod; ② the SealedSecret's name or namespace was changed; ③ the cluster was rebuilt, the controller generated a new key pair, and the old private key was not backed up.
Root cause: By default, the strict scope binds the namespace and name into the ciphertext; each cluster's controller has its own private key (by default a new key is added every 30 days, and old keys are kept for decryption).
kubectl -n podinfo-prod get sealedsecret db-cred -o jsonpath='{.status.conditions}' | jq
kubectl -n kube-system get secret -l sealedsecrets.bitnami.com/sealed-secrets-key --sort-by=.metadata.creationTimestamp
kubeseal --controller-namespace kube-system --fetch-cert | openssl x509 -noout -fingerprint -sha256
kubeseal --controller-namespace kube-system --format yaml --namespace podinfo-prod --name db-cred < db-cred.secret.yaml > db-cred.sealed.yaml # re-encrypt with the target cluster's certificate # Cluster rebuilt: restore the old private key Secret from backup into kube-system and restart the controller
apps/podinfo/overlays/prod/sealed/.Warning ErrUpdateFailed sealed-secrets Resource "db-cred" already exists and is not managed by SealedSecret
Official source controller.go: Resource %q already exists and is not managed by SealedSecret.
Symptom: Migrating from a “manually created Secret” to Sealed Secrets: the SealedSecret has synced, but the Secret still holds the old value.
Root cause: The controller only updates Secrets it created itself (ownerReference points to the SealedSecret), and does not overwrite an existing Secret with the same name, so as not to break data managed by others.
kubectl -n podinfo-prod get secret db-cred -o jsonpath='{.metadata.ownerReferences}{"\n"}{.metadata.annotations}{"\n"}'
Two approaches: delete the old Secret so the controller recreates it (brief absence; do it in a maintenance window); or add an annotation to the old Secret sealedsecrets.bitnami.com/managed: "true" so the controller takes it over (follow the Sealed Secrets docs).
See Lesson 5 Module 4.
$ kubectl -n podinfo-prod get externalsecret db-cred NAME STORETYPE STORE REFRESH INTERVAL STATUS READY db-cred ClusterSecretStore azure-kv 1h SecretSyncedError False
Official source ESO apis/externalsecrets/v1: ConditionReasonSecretSyncedError = "SecretSyncedError". This lesson uses API version external-secrets.io/v1.
Symptom: An entry in the external secret store was renamed, its permissions (Workload Identity binding) expired, or the SecretStore's authentication config is wrong; or the ExternalSecret syncs normally but Argo CD stays OutOfSync (ESO's admission / defaulting fills in fields in the spec).
Root cause: Argo CD only puts the ExternalSecret object into the cluster; fetching is done by ESO, and errors appear in the status of the ExternalSecret / SecretStore. Default-value differences belong to the #14 category.
kubectl -n podinfo-prod describe externalsecret db-cred | sed -n '/Status:/,$p' | head -20
kubectl get clustersecretstore azure-kv -o jsonpath='{.status.conditions}' | jq
argocd app diff podinfo-prod | grep -A3 ExternalSecret
remoteRef.key.ComparisonError Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = … could not find plugin supporting the given repository
Source-verified util/app/discovery/discovery.go: could not find plugin supporting the given repository (when there is an inner error it is …: %w).
Symptom: A Config Management Plugin for SOPS decryption was written (as a sidecar), and the application specifies plugin: {} or plugin: {name: sops-kustomize}, yet it still reports that the plugin cannot be found.
Root cause (common):① the sidecar container does not use /var/run/argocd/argocd-cmp-server as its entrypoint, or does not mount /var/run/argocd and the plugin configuration; ②plugin.yaml the discover rule (fileName / find.glob) does not match the files in the repo; ③ the name written in the application does not match the plugin name — a plugin name with a version number is <name>-<version>; ④ the sidecar runs as root or the image lacks the tool, so startup fails.
kubectl -n argocd get pod -l app.kubernetes.io/name=argocd-repo-server -o jsonpath='{.items[0].spec.containers[*].name}'; echo
kubectl -n argocd logs deploy/argocd-repo-server -c sops-kustomize --tail=30
kubectl -n argocd logs deploy/argocd-repo-server -c repo-server --tail=50 | grep -i plugin
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata: {name: sops-kustomize}
spec:
discover:
find:
glob: "**/*.enc.yaml"
generate:
command: [sh, -c, "kustomize build --enable-alpha-plugins --enable-exec ."]
argocd app manifests) — if you can use ESO / Sealed Secrets, do not use SOPS-in-CMP.ARGOCD_EXEC_TIMEOUT constraints (#43).ComparisonError Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): `helm dependency build` failed timeout after 1m30s
Source-verified reposerver/repository/repository.go: cachedManifestGenerationPrefix = "Manifest generation error (cached)".Official docs CMP commands are subject to ARGOCD_EXEC_TIMEOUT a constraint, default 90 seconds; controller.repo.server.timeout.seconds default 60.
Symptom: Large Helm charts (many dependencies, pulled from the internet), huge Kustomize trees, and slow CMPs that occasionally time out; after a fix, the same error is still reported — with (cached).
Root cause: Repo Server caches consecutive failures of rendering, to avoid repeatedly running expensive renders that are destined to fail; during the cache period, even if the root cause has been eliminated, the cached error is returned directly. Timeouts exist at several layers: tool execution (ARGOCD_EXEC_TIMEOUT), the controller → repo-server gRPC timeout, and repo-server concurrency limits reposerver.parallelism.limit that cause queuing.
argocd app get myapp --hard-refresh # hard refresh: bypass the manifest cache and re-render kubectl -n argocd logs deploy/argocd-repo-server --since=15m | grep -iE 'timeout|deadline|took' kubectl -n argocd get cm argocd-cmd-params-cm -o yaml | grep -E 'repo.server.timeout|parallelism'
configs:
params:
controller.repo.server.timeout.seconds: "180"
server.repo.server.timeout.seconds: "180"
repoServer:
env:
- {name: ARGOCD_EXEC_TIMEOUT, value: "180s"}
replicas: 2
charts/ + Chart.lock), avoid accessing the internet during rendering; split huge monolithic applications.argocd_repo_pending_request_total the rendering-duration histogram (Lesson 7 Module 4).See Lesson 7 Module 3 Repo Server: caching, timeouts and manifest generation.
$ argocd app sync podinfo-prod FATA[0000] rpc error: code = PermissionDenied desc = cannot sync: blocked by sync window # During auto-sync, the operation status message is: Sync operation blocked by sync window
Source-verified server/application/application.go: cannot sync: blocked by sync window; controller/sync.go: Sync operation blocked by sync window.
Symptom: On Friday evening, while fixing a production issue, a manual sync is rejected; or after a change freeze ends, some applications do not auto-sync.
Root cause: The AppProject's syncWindows (allow / deny, cron + duration, matched by application / namespace / cluster). Deny windows take precedence; manualSync: true permits manual sync within the window.
argocd proj windows list team-a argocd app get podinfo-prod | grep -i window
For emergency changes, follow the “break-glass” process: the platform team temporarily adds manualSync: true (leaving a review record) in Git, or temporarily disables the window after approval; do not directly kubectl apply bypass Argo CD (self-healing will revert it later).
timeZone set the field explicitly to avoid UTC errors; window changes themselves go through Git.Name: podinfo Status: ✖ Degraded Message: RolloutAborted: Rollout aborted update to revision 5: Metric "success-rate" assessed Failed … Strategy: Canary Step: 1/6 SetWeight: 0
Symptom:① a canary step has an indefinite pause: {}, nobody runs promote, and the application shows Suspended; ② analysis fails, the Rollout automatically aborts and returns to the stable version, the application is Degraded, but Git still has the new version — Argo CD shows Synced, because the Rollout's spec does match Git.
Root cause: Rollouts manages “how to go live”; Argo CD manages “what is desired.” After an abort, the desired state (Git) differing from the running version is by design: a person or automation must change Git back (or, after a fix, advance to a new version).
kubectl argo rollouts get rollout podinfo -n podinfo-prod kubectl -n podinfo-prod get analysisrun --sort-by=.metadata.creationTimestamp | tail -3 argocd app get podinfo-prod | grep -E 'Rollout|Suspended|Degraded'
kubectl argo rollouts promote podinfo -n podinfo-prod # after confirming, advance the paused step (the Argo CD UI also has a resume action) cd ~/gitops-lab && git revert --no-edit HEAD && git push # analysis failed: roll back Git so the desired state matches the stable version
duration a duration, or let analysis advance them automatically; indefinite pauses are only for production that needs a manual gate, and should be paired with notifications.on-health-degraded; include “automatically open a rollback PR after an abort” in the workflow of the promotion tool (Kargo, etc.).See Lesson 6 Module 2 Argo Rollouts,Module 3 AnalysisTemplate.
New image 6.17.0 pushed → 30 minutes later podinfo-dev is still 6.16.0 argocd-image-updater logs: … could not … push … / … not supported for application …
Official docs Image Updater README (v1.5.0): uses a dedicated ImageUpdater CR defines tracking and update rules; only supports Kustomize, Helm or Plugin built applications; plain YAML applications are not supported; updates are done via Argo CD parameter overrides or commits to Git; the README still warns “not recommended for critical production workloads.”
Symptom: Following an old blog, an annotation was added to the Application argocd-image-updater.argoproj.io/image-list that has no effect in v1.x; or the application is a plain YAML directory; or git the write-back method lacks push credentials / the branch is protected.
Root cause: The v1.x configuration model changed to CRs; writing back to Git requires credentials with push permission, and is subject to branch protection rules.
kubectl get crd | grep -i imageupdater kubectl -n argocd get imageupdaters.argocd-image-updater.argoproj.io 2>/dev/null || kubectl get imageupdater -A kubectl -n argocd logs deploy/argocd-image-updater-controller --tail=80 2>/dev/null | grep -iE 'error|denied|skip' argocd app get podinfo-dev -o json | jq -r '.status.sourceType'
ImageUpdater resource for the application (check fields against the CRD and docs for your installed version); change podinfo to a Kustomize overlay (images:) or to Helm values.latest.podinfo-prod Degraded for 20 minutes, no messages in the Slack channel; no sent records in the argocd-notifications-controller logs
Symptom: Notifications is installed but has no effect; or only some applications send notifications; or dev notifications flood the channel.
Root cause: Three things are needed at the same time: ①argocd-notifications-cm the service (service.slack),triggers (trigger.on-health-degraded), and templates; ②argocd-notifications-secret token in subscription annotation, for example notifications.argoproj.io/subscribe.on-health-degraded.slack: podinfo-alerts. If any one of them is missing, nothing is sent.
kubectl -n argocd get application podinfo-prod -o jsonpath='{.metadata.annotations}' | jq 'with_entries(select(.key|startswith("notifications")))'
argocd admin notifications trigger get -n argocd 2>/dev/null | head
argocd admin notifications template notify app-health-degraded podinfo-prod --recipient slack:podinfo-alerts -n argocd
kubectl -n argocd logs deploy/argocd-notifications-controller --tail=50
Fill in the missing links; it is recommended to add AppProject on the project so that all applications in the project inherit it and none is missed one by one.
oncePer to avoid duplicates.$ kubectl -n argocd get pod argocd-application-controller-0 NAME READY STATUS RESTARTS AGE argocd-application-controller-0 0/1 OOMKilled 7 (2m ago) 3d
Symptom: After the number of applications grew from 200 to 2000 and several large clusters were newly onboarded (many CRDs, Events, ReplicaSet history), the controller repeatedly OOMs; statuses in the UI are not updated for long periods; syncs queue up.
Root cause: The controller maintains, for each managed cluster, one watch cache of all resource types (by default it caches almost all resources in the cluster, not just managed ones); memory is proportional to cluster size; reconciliation work is done by a limited number of processors (status 20, operation 10); a single StatefulSet replica handles all clusters.
kubectl -n argocd top pod -l app.kubernetes.io/name=argocd-application-controller argocd admin cluster stats -n argocd # resource count, API count and cache status per cluster argocd admin cluster shards -n argocd 2>/dev/null kubectl -n argocd logs sts/argocd-application-controller --tail=100 | grep -iE 'reconciliation|took|queue'
controller:
replicas: 3 # sharding: assign clusters to different replicas
resources: {requests: {memory: 2Gi}, limits: {memory: 4Gi}}
configs:
params:
controller.sharding.algorithm: round-robin # default legacy (hash by cluster ID); round-robin is Alpha, follow feature-maturity
controller.status.processors: "50"
controller.operation.processors: "25"
cm:
resource.exclusions: | # do not cache unneeded resource types
- apiGroups: ["events.k8s.io", ""]
kinds: ["Event"]
clusters: ["*"]
resource.exclusions already excludes a batch of frequently changing resources (upgrade notes “Default resource.exclusions configurations”); when customizing, do not overwrite the defaults.argocd_app_reconcile (histogram),workqueue_depth, controller memory; do capacity planning by application count / cluster resource count (interview Q34).See Lesson 7 Module 2 Application Controller sharding and performance tuning.
… 429 Too Many Requests / API rate limit exceeded for installation ID … GitLab: argocd-repo-server's git ls-remote requests account for 60% of all traffic
Official docs argocd-cm Example: timeout.reconciliation: 120s,timeout.reconciliation.jitter: 60s; the Git generator polls every 3 minutes by default.
Symptom: The PR generator / SCM Provider generator triggers GitHub API rate limiting and preview environments stop updating; self-hosted GitLab load rises; in a monorepo, any commit causes all applications to re-render.
Root cause: Each application periodically ls-remote resolves its revision; in a monorepo, one commit changes the revision of all applications → everything re-renders. The PR / SCM generators call the hosting platform's API.
kubectl -n argocd get cm argocd-cm -o jsonpath='{.data.timeout\.reconciliation}{" "}{.data.timeout\.reconciliation\.jitter}'; echo
kubectl -n argocd port-forward deploy/argocd-repo-server 8084:8084 & sleep 1; curl -s localhost:8084/metrics | grep -E '^argocd_git_request_total' | head # 8084 is the repo-server metrics port
timeout.reconciliation: 300s).argocd.argoproj.io/manifest-generate-paths: . (or a specific path), so re-rendering happens only when relevant paths change.requeueAfterSeconds.argocd_git_request_total, and the GitHub App's remaining quota (the ApplicationSet controller provides GitHub rate-limit metrics).The CustomResourceDefinition "applicationsets.argoproj.io" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes
Official docs 3.2 → 3.3 upgrade notes: the ApplicationSet CRD exceeds the size limit for client-side apply, so you must use kubectl apply --server-side --force-conflicts to upgrade; when Argo CD self-manages, enable in the Application ServerSideApply=true; use helm upgrade to upgrade are not affected. 2.14 → 3.0 upgrade notes: the default changed to annotation tracking; if the first sync after switching includes deleting resources, Argo CD may not recognize that resource and will not delete it (an orphan), so it is recommended to sync all applications once after upgrading.
Symptom:① using kubectl apply -f install.yaml or upgrading to 3.3+ by Argo CD itself (SSA not enabled) causes CRD updates to fail, and old and new components run side by side; ② a few weeks after upgrading to v3, a resource was deleted from Git but remained in the cluster.
Root cause: See above; in addition, v3 ignores by default status field differences; ignoreDifferences is also used to ignore update events, so a few teams that rely on the old behavior will see the “difference disappear.”
kubectl get cm argocd-cm -n argocd -o jsonpath='{.data.application\.resourceTrackingMethod}'; echo # empty or label means v2 label tracking
kubectl get applications.argoproj.io -A -o json | jq -r '.items[] | select(.spec.syncPolicy.syncOptions[]? == "ApplyOutOfSyncOnly=true") | .metadata.name'
kubectl get crd applicationsets.argoproj.io -o jsonpath='{.metadata.annotations}' | wc -c
kubectl -n argocd get deploy,sts -o custom-columns=NAME:.metadata.name,IMAGE:.spec.template.spec.containers[0].image
The first two commands come from the “Detection” section of the 2.14 → 3.0 upgrade notes.
# For 3.3+, upgrade using manifests: kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/v3.6.1/manifests/install.yaml # This lesson's Helm approach: helm upgrade argocd argo/argo-cd -n argocd --version 10.18.0 -f ~/gitops-lab/bootstrap/argocd-values.yaml # After upgrading to v3: sync all applications once (applications using ApplyOutOfSyncOnly must sync once without that option), so the tracking annotations are written
argocd admin export back up (Lesson 7 Module 7).See Lesson 7 Module 7 Upgrades and disaster recovery,Lesson 2 Module 7 Resource tracking methods.
Starting from the symptom you see, locate the issue number step by step.
kube-system) and kubeseal; Lab 4-B modifies the AppProject lab8. Output is an example.kubectl create secret generic db-cred --from-literal=password=s3cr3t -n lab8-pb39 --dry-run=client -o yaml \ | kubeseal --controller-namespace kube-system --format yaml > /tmp/db-cred.sealed.yaml sed 's/namespace: lab8-pb39/namespace: lab8-pb39b/' /tmp/db-cred.sealed.yaml > /tmp/db-cred.moved.yaml kubectl create ns lab8-pb39b; kubectl apply -f /tmp/db-cred.moved.yaml sleep 3; kubectl -n lab8-pb39b get events --field-selector reason=ErrUnsealFailed -o custom-columns=MSG:.message
MSG Failed to unseal: no key could decrypt secret (password)
Under strict scope, moving the ciphertext to another namespace makes it undecryptable — this is precisely its security design.
kubectl delete ns lab8-pb39b
argocd proj windows add lab8 --kind deny --schedule '* * * * *' --duration 1h --applications '*' l8_app pb44 lab8/pb07 --sync-option CreateNamespace=true argocd app sync lab8-pb44; echo "exit=$?"
FATA[0000] rpc error: code = PermissionDenied desc = cannot sync: blocked by sync window exit=20
argocd proj windows list lab8 argocd proj windows enable-manual-sync lab8 0 && argocd app sync lab8-pb44 # allow manual sync within the window (break-glass) argocd proj windows delete lab8 0
mkdir -p ~/gitops-lab/lab8/pb43 && printf 'resources:\n- missing.yaml\n' > ~/gitops-lab/lab8/pb43/kustomization.yaml cd ~/gitops-lab && git add lab8 && git commit -qm "lab8: pb43 broken" && git push -q l8_app pb43 lab8/pb43 --sync-option CreateNamespace=true; for i in 1 2 3; do argocd app get lab8-pb43 --refresh >/dev/null; done; l8_why pb43 | tail -1
After several refreshes, the message may contain Manifest generation error (cached) (whether it appears, and the count threshold, depend on repo-server configuration; check actual output). After fixing the kustomization, use --hard-refresh to re-render immediately.
l8_clean
No verified video was found that specifically covers CMP troubleshooting, cached render errors, sync window break-glass, or 3.3 CRD upgrades; storyboard:
ErrUnsealFailed; explain strict scope and private key backup.enable-manual-sync demonstrate a controlled break-glass.--server-side --force-conflicts to upgrade.Browse the questions and focus areas first, mark the ones you're unsure of; click a row to jump to the details.
GitOps is an operating model in which the system's desired state is stored declaratively in version control, and an agent running inside the environment automatically pulls it and continuously reconciles the actual state. OpenGitOps (the GitOps working group under CNCF) gives four principles: ①Declarative (Declarative); ②Versioned and immutable (Versioned and Immutable); ③Pulled automatically (Pulled Automatically); ④Continuously reconciled (Continuously Reconciled).
kubectl apply in CI — does that count as GitOps? It only satisfies the first two principles; without pulling and continuous reconciliation, drift is invisible (Q3).Be able to say “Git is the single source of truth for desired state, but not for running state” — status, metrics and events still live in the cluster and monitoring systems; also mention the organizational changes the principles bring: changes go through PR review, and permissions shift from “who can access the cluster” to “who can merge into which directory.”
“GitOps is Argo CD” or “GitOps is putting the Jenkinsfile in Git” — confusing principles with tools, and CI with CD.
Push: the CI/CD system holds the cluster credentials and runs kubectl apply / helm upgrade. Pull: an agent inside (or next to) the cluster holds read-only credentials to the source, actively pulls the desired state and applies it. Pull keeps high-privilege credentials inside the cluster boundary, supports continuous reconciliation, is naturally suited to multi-cluster and network isolation (the cluster only needs outbound access to Git).
| Dimension | Push | Pull |
|---|---|---|
| Credentials | CI holds cluster admin credentials (large blast radius) | The agent holds read-only Git credentials; CI only needs to push to Git |
| Network | CI must be able to reach every cluster's API | The cluster reaches Git outbound; friendlier for private clusters |
| Drift | Applied only once, when the pipeline runs | Continuously compared, self-healing |
| Observability | Pipeline logs | Real-time Sync / Health status per application |
| Trade-offs | Simple, immediate, with a clear “failure” signal | Eventually consistent; needs an extra mechanism to feed results back to CI (argocd app wait, notifications, commit status) |
Mention that “push can also achieve auditing and review”; the value unique to pull is continuous reconciliation and the credential boundary; and pull shifts the control point for “who can deploy” to Git branch protection and CODEOWNERS.
“Pull is faster” — usually slower (polling), and needs webhook compensation (#29, #49).
kubectl apply / helm upgrade. How would you argue for migrating to GitOps? What are the migration risks?IntermediateArguments: ①drift is visible and correctable (manual hotfixes no longer quietly stay in production); ②credentials are consolidated (CI no longer holds production cluster admin); ③auditing and rollback unified into Git history; ④Multi-cluster consistency (the same declaration fans out to N clusters); ⑤Disaster recovery (new clusters rebuilt from Git). Risks: learning curve, feedback becomes asynchronous, Helm semantic changes, dual writes and resource takeover during migration.
argocd app wait or commit status to get the result.helm template to render and apply by itself, without creating a Helm release; resources that already have a release need to be taken over (Q48).Emphasize a gradual migration that “observes before acting,” plus a rollback plan; mention that separating CI and CD permissions helps compliance (SOC 2 change management controls).
“Just replace the pipeline's last step with argocd app sync” — that is still push-style thinking, and it conflicts with auto-sync (#20).
Recommendation: keep the application code repo and the deployment config repo separate (avoids CI write-backs triggering themselves and keeps permissions separate); use directories (overlays/dev|staging|prod) for environments rather than long-lived branches. Whether to use a single or multiple repos depends on team boundaries — the platform layer gets one repo, and each team gets a config repo or is split by directory + CODEOWNERS within a single repo.
diff -r).manifest-generate-paths to mitigate).apps/podinfo/base/ apps/podinfo/overlays/{dev,staging,prod}/
argocd/apps/ argocd/appsets/ argocd/projects/ argocd/root.yaml
bootstrap/argocd-values.yaml
Explain that “repo structure = org structure + permission model,” and mention branch protection, CODEOWNERS, and required checks (rendering, policy validation) as change control points for GitOps.
“One long-lived branch per environment; merging dev into main means going live” — this is the most common anti-pattern.
Principle: Never put plaintext in Git. Three approaches: ①encrypt and commit to Git (Sealed Secrets, SOPS) — Git is the single source, but key management and rotation are on you; ②reference in Git, values in an external secret store (External Secrets Operator, Secrets Store CSI Driver) — the secret store is the source, and Git only holds “where to fetch from”; ③inject at deploy time (CMP / plugin rendering) — the most flexible and also the most dangerous; plaintext passes through the GitOps tool.
| Approach | Where decrypted | Advantages | Risks |
|---|---|---|---|
| Sealed Secrets | In-cluster controller | Simple, works offline | per-cluster private keys, backup and rotation; re-encryption |
| SOPS (+ KMS / age) | Rendering tool / plugin | Readable file structure, KMS auditing | Plaintext enters rendering and cache (#42) |
| ESO | In-cluster operator | Centralized rotation, auditing, integration with cloud identity | Depends on secret store availability and identity configuration (#41) |
| CSI Driver | Node mount | May avoid creating a Secret object | The application must read files; differs from the env variable approach |
Point out that a Kubernetes Secret is merely base64 and needs etcd encryption (KMS provider) and RBAC; and that the source of secrets should match the organization's existing secret store (Key Vault, Vault, Secrets Manager).
“Base64-encode it and put it in Git” or “a private repo is safe.”
Drift = actual state deviates from Git. The agent detects it continuously; policies come in three levels: alert only (OutOfSync + notification),auto-correct (selfHeal),deliberately ignore (ignoreDifferences, for fields owned by other controllers). Break-glass process: approval, time limit, and a record, and afterwards backfill the change into Git or revert it, so that Git becomes the source of truth again.
selfHeal selfHeal / auto-sync (change in Git or via an authorized API), fix manually, backfill later; ③ in a sync window, the manualSync override (#44); ④ full bypass (direct kubectl) only when Argo CD itself is unavailable.flux suspend kustomization …) and resume; the principle is the same.Treat break-glass as a rehearsed process (quarterly drills), and track “OutOfSync duration” and “selfHeal count” as platform health indicators.
“Under GitOps you must never change anything by hand” — in reality break-glass is needed; the key is that it is controlled and can be backfilled.
argocd-server (API, UI, authentication and RBAC decisions, webhook entry); argocd-repo-server (clones repos, resolves revisions, renders manifests: Kustomize / Helm / plain YAML / CMP; stateless and horizontally scalable); argocd-application-controller (StatefulSet: maintains the cluster cache, compares desired and live state, performs syncs, evaluates health, writes Application status back; can be sharded by cluster); Redis (caches rendered results and the application tree; not the persistent source of truth); argocd-applicationset-controller (generates Applications); Dex (optional, SSO connector); argocd-notifications-controller (notifications). All configuration and state are stored in Kubernetes objects (CRDs, ConfigMaps, Secrets).
argocd-cm,argocd-rbac-cm,argocd-cmd-params-cm; credentials and clusters live in labeled Secrets — this is what makes “Argo CD managed by GitOps” possible (Q13).Mention the security implications: repo-server executes user-provided templates and plugins, so it is the focus of isolation (network policies, no SA token mounted); the controller holds high privileges on target clusters.
“Argo CD stores application definitions in Redis / a database.”
The controller periodically (timeout.reconciliation default 120 seconds, plus up to 60 seconds of jitter) or on a webhook / user request processes applications: asks repo-server for the manifests at the target revision (returned directly if cached) → compares with live objects in the cluster cache → derives Sync Status and Health → starts a sync if auto-sync is enabled → writes back status. refresh A refresh only re-compares (re-renders only when the revision changes); hard refresh a hard refresh also discards the manifest cache and forces re-rendering.
reposerver.default.cache.expiration).argocd app get podinfo-dev --refresh argocd app get podinfo-dev --hard-refresh
Be able to break “how long until a push takes effect” into five stages: detect, queue, render, compare, sync (Figure 4-2).
“Run git pull every 3 minutes and then kubectl apply everything.”
Sync Status: whether desired and live state match (Synced / OutOfSync / Unknown). Health: whether the resources themselves are healthy (Healthy / Progressing / Degraded / Suspended / Missing / Unknown). Operation State: the result of the most recent sync operation (Running / Succeeded / Failed / Error / Terminating). The three are independent.
argocd app wait --sync --health— and check the operation state, to avoid mistaking an old healthy version for success (compare the synced revision).Mention that in App of Apps, the health of child Applications is not evaluated by default (removed since 1.8); a custom health check is needed for waves to wait for child application health.
“Synced means the deployment succeeded.”
Argo CD is an Application-centric platform: a centralized controller plus its own API Server, UI, SSO, RBAC and multi-cluster management (hub-spoke). Flux (v2; the latest as of the verification date is v2.10.0) is a set of composable Kubernetes controllers (GitOps Toolkit): source-controller (fetches from Git / Helm / OCI / Bucket), kustomize-controller, helm-controller, notification-controller, image-reflector / image-automation-controller, declared via CRDs (GitRepository, Kustomization, HelmRelease…); usually each cluster runs its own set.
| Dimension | Argo CD | Flux |
|---|---|---|
| Interaction entry point | Web UI + CLI + API, with its own user system | CLI + kubectl; no built-in web UI (third-party / operator-provided interfaces exist in the ecosystem; check actual options) |
| Permission model | Own RBAC (Casbin) + AppProject + SSO | Kubernetes RBAC; controllers impersonate a specified ServiceAccount (impersonation) |
| Helm | helm template Renders and applies by itself, no Helm release | helm-controller uses the Helm SDK to perform real install / upgrade, with release history and Helm hook semantics |
| Multi-cluster | One instance manages multiple clusters (credentials centralized) | Usually one set per cluster (pure pull); remote kubeconfig is also possible |
| Unit of extension | Application / ApplicationSet | Kustomization / HelmRelease and dependencies (dependsOn) |
Reduce the difference to “platform product vs toolkit”: Argo CD is an out-of-the-box multi-tenant portal; Flux is closer to Kubernetes-native and easier to embed in a custom-built platform.
“Flux does not support Helm” or “Argo CD does not support Kustomize.”
Multi-tenancy: Argo CD's boundary is AppProject + Argo CD RBAC, the controller itself usually has very high cluster privileges, and isolation relies on Argo CD's validation; Flux's boundary is Kubernetes RBAC, tenants' Kustomization / HelmRelease run under the tenant's own ServiceAccount, and permissions are enforced by the API Server. Helm: Argo CD does not produce a release,lookup (the Helm CLI is not available), Helm hooks are mapped to Argo CD hooks; Flux keeps the full Helm lifecycle (release history, rollback, hooks,helm list visibility).
lookup (random password generation) change on every render in Argo CD (OutOfSync loop); helm.sh/hook are executed in Argo CD via their mapping (e.g., pre-delete → PreDelete); operational habits (helm rollback) no longer apply; rollback is git revert.Point out that “who enforces isolation” is the core question of a security review: enforcement by the API Server (Flux impersonation / Argo CD impersonation) is more reliable than application-layer validation.
“Argo CD's AppProject and Kubernetes RBAC are the same thing.”
Decide by criteria rather than preference: strong demand for developer self-service and visualization, and a need for a centralized multi-cluster view with SSO/RBAC → lean toward Argo CD; platform teams wanting Kubernetes-native, per-cluster autonomy, strong Helm semantics, and embedding into a home-built platform → lean toward Flux. For this scenario (UI, 20 teams, centralized governance) I would choose Argo CD and use AppProject + SSO groups + ApplicationSet to build a self-service model. Coexistence is feasible: for example, Flux handles cluster bootstrap and the platform layer while Argo CD handles the application layer — but draw a clear line on “who manages which object,” so the two reconcilers do not fight over the same resource.
Mention “exit cost”: both sources are standard Kubernetes manifests in Git; migration cost lies mainly in the CRD wrapper layer (Application vs Kustomization / HelmRelease) and operational processes, not in the applications themselves.
“Argo CD is more popular, so pick it” — there is no such standard; or “coexistence has no problems” — ignoring ownership conflicts.
Bootstrap: install once manually with Helm (or kustomize) → create an bootstrap/ Application that manages Argo CD itself (chart + values) → a root app (App of Apps) manages projects, repos, clusters and all applications. Afterwards, upgrading means changing the chart version in Git. Key points for the v3 upgrade: the tracking method changes by default to annotations,log RBAC enforced,update/delete no longer inherited,old repository configuration in argocd-cm removed, default resource.exclusions, ignoring status, some metrics removed; and for 3.3 CRDs must be applied server-side, for 3.5 Helm 4 and Source Integrity, and for 3.6 SSA → Server-Side Diff.
helm upgrade recovery path and break-glass documentation.ServerSideApply=true (from 3.3 onward it is a prerequisite for upgrades, #50), disable prune or use Prune=false to protect CRDs and Secrets.argocd admin export back up, watch metrics (reconcile duration, memory).argocd_app_sync_status,argocd_app_health_status,argocd_app_created_time (replaced by the labels of argocd_app_info ), and alerting rules must be updated accordingly.Be able to say that after upgrading you “sync all applications once” to write the tracking annotations, avoiding orphan resources (the warning in the 2.14 → 3.0 upgrade notes).
“Just kubectl apply the latest install.yaml” — from 3.3 onward this fails because of over-long CRD annotations.
The team has 12 microservices; the Jenkins pipeline holds the production cluster's kubeconfig, and every helm upgrade --install. Last quarter there were two incidents: once, an on-call engineer manually edited a ConfigMap and it was overwritten by the next deployment; once, an audit failed on the risk of Jenkins credential leakage. Please provide a migration plan and timeline.
Key points of the reference answer
argocd app wait to get the result; ⑤ revoke Jenkins's cluster credentials.
The platform team has 4 people, supporting 30 development teams, with 2 clusters in each of 3 regions; the security team requires “tenants may only affect their own namespaces, enforced by the API Server”; developers want to self-serve deployment status and logs.
Key points of the reference answer
Selection videos reflect the author's stance and may be based on older versions; go by both sides' official documentation and your own PoC.
Browse the questions and focus areas first; click a row to jump to the details.
metadata (name, namespace argocd,resources-finalizer) → spec.project (permission boundary) → source/sources (repoURL, targetRevision, path or chart, Kustomize/Helm parameters) → destination (server or name + namespace) → syncPolicy (automated, syncOptions, retry, managedNamespaceMetadata) → ignoreDifferences.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: podinfo-prod
namespace: argocd
finalizers: [resources-finalizer.argocd.argoproj.io] # cascade on deletion
annotations:
notifications.argoproj.io/subscribe.on-health-degraded.slack: podinfo-alerts
spec:
project: team-a
source:
repoURL: https://github.com/<you>/gitops-lab
targetRevision: main
path: apps/podinfo/overlays/prod
destination: {name: lab, namespace: podinfo-prod}
syncPolicy:
automated: {prune: true, selfHeal: true}
syncOptions: [ServerSideApply=true, PruneLast=true, FailOnSharedResource=true]
retry: {limit: 3, backoff: {duration: 10s, factor: 2, maxDuration: 3m}}
Point out that this manifest itself is also in Git (argocd/apps/) and is managed by the root app, avoiding imperative changes (#12).
Filling in both destination server and name, or thinking a project is merely a “grouping label.”
automated: automatically syncs when a new revision appears in Git. prune: automatically deletes resources that no longer exist in Git. selfHeal: also automatically syncs back to the desired state when the live state is changed (with no new commit). allowEmpty: allows the application to have no resources after pruning (disallowed by default, to prevent deleting everything when rendering comes back empty). Production: auto-sync + selfHeal + prune, but add Prune=false / Delete=false, and keep allowEmpty: false.
controller.self.heal.timeout.seconds, deprecated since 3.3: --self-heal-backoff-cooldown-seconds).allowEmpty: false is the last line of defense against “rendering an empty list” (a wrong path, a generator returning nothing, or values disabling all resources).Connect to #23 and #42 (post-mortem): the biggest risk of prune is “accidentally deleting stateful resources”; protect them with resource-level annotations instead of turning prune off globally.
“selfHeal is just retrying failures.”
See Lesson 1 Module 7.
By phase: PreSync → Sync → PostSync (on any failure, runs SyncFail); deleting an application also has PreDelete / PostDelete. Within each phase, sort by argocd.argoproj.io/sync-wave from smallest to largest; within the same wave, sort by kind (Namespace, CRD, etc. first) and name; after each wave is applied,wait for health before moving to the next wave.
db-migrate Job: hook: PreSync, hook-delete-policy: BeforeHookCreation, activeDeadlineSeconds: 600 ConfigMap: sync-wave: "-1" Deployment: sync-wave: "0" smoke-test Job: hook: PostSync notify-fail Job: hook: SyncFail
HookSucceeded,HookFailed,BeforeHookCreation (most commonly used; avoids a same-name Job already existing).Migration scripts must be backward compatible (expand / contract), because after PreSync succeeds the Deployment may fail and roll back (Q49).
“Higher waves run first” or “all resources are applied at once and waves are just labels.”
See Lesson 2 Module 4.
ServerSideApply=true: large objects (avoids the last-applied annotation exceeding its limit, #15), and coexisting with other field managers; from 3.6 Server-Side Diff is also enabled.Replace=true: immutable fields that truly need replace / create semantics; there is a risk of delete-and-recreate, so use with caution.CreateNamespace=true: creates the target namespace (#17), together with managedNamespaceMetadata.PruneLast=true: prune after all waves complete, to reduce disruption.ApplyOutOfSyncOnly=true: applies only the resources that have differences, reducing API pressure for large applications (switching tracking methods in v3 needs special handling, #50).Validate=false,SkipDryRunOnMissingResource=true,RespectIgnoreDifferences=true,FailOnSharedResource=true,Prune=false|confirm,Delete=false|confirm,PrunePropagationPolicy.argocd.argoproj.io/sync-options (separate multiple values with commas).Give a default template: ServerSideApply=true, PruneLast=true, FailOnSharedResource=true, and add to stateful resources Prune=false.
Treating Replace as a switch that “solves all apply errors.”
See Lesson 2 Module 3.
Legacy: inside the controller, a three-way merge (last-applied, desired, live) plus normalization approximates the API Server's result; it cannot see server-side defaults or webhook modifications, so it easily produces false diffs (#14). Server-Side Diff: performs an SSA dry-run against the API Server to get “what would be applied now” and compares that with the live object — accurate, but adds API requests. v3.6: Structured-Merge Diff was removed; enabling ServerSideApply=true applications automatically use Server-Side Diff; validating webhooks reject resources already during the diff stage.
controller.diff.server.side: "true" (globally), the annotation argocd.argoproj.io/compare-options: ServerSideDiff=true (per application); ServerSideDiff=false the annotation always takes precedence, and you can fall back to Legacy.argocd app diff --server-side-diff.Be able to say that diff and sync are two different things: Server-Side Diff decides “whether it is OutOfSync,” and SSA decides “how it is written.”
“Argo CD directly compares YAML text.”
See Lesson 2 Module 6.
jsonPointers: exact path (/spec/replicas); jqPathExpressions: can select by condition (for example, a particular field of a container with a given name); managedFieldsManagers: ignores fields written by specified field managers (such as kube-controller-manager, a particular operator). ignoreDifferences only affects comparison; during sync, the value from Git is still written back unless RespectIgnoreDifferences=true is added.
ignoreDifferences: - group: apps kind: Deployment jqPathExpressions: - '.spec.template.spec.containers[] | select(.name == "istio-proxy")' - group: admissionregistration.k8s.io kind: MutatingWebhookConfiguration jsonPointers: [/webhooks/0/clientConfig/caBundle]
argocd-cm the resource.customizations.ignoreDifferences.<group_kind>; put application-specific settings in the Application.Emphasize that “the best ignoreDifferences is the one you don't need”: first remove from Git the fields you should not be managing.
Using ignoreDifferences to hide real drift (for example, a manually changed image).
Built-in checks (gitops-engine) cover Deployment, StatefulSet, DaemonSet, ReplicaSet, Pod, Job, PVC, Service, Ingress, HPA, APIService and more; there are also many community Lua checks (cert-manager, Rollouts, ESO, etc.). For custom checks, write a Lua script in argocd-cm the resource.customizations.health.<group_kind> configuration that returns {status, message}.
resource.customizations.health.example.com_Widget: |
hs = {status = "Progressing", message = "Waiting"}
if obj.status ~= nil and obj.status.conditions ~= nil then
for _, c in ipairs(obj.status.conditions) do
if c.type == "Ready" and c.status == "True" then hs.status = "Healthy"; hs.message = c.message end
if c.type == "Ready" and c.status == "False" then hs.status = "Degraded"; hs.message = c.message end
end
end
return hs
argoproj.io/Application 's health; a custom check is needed for waves to wait (official health docs).Health checks are the “brakes” of automation: they decide whether waves advance, whether RollingSync continues, and whether notifications are sent.
“Healthy just means Pods are Running.”
See Lesson 2 Module 5.
Typical use: the chart comes from an external Helm repository, and the environment values come from your own Git repo (ref: values + $values/…); or one application is composed of multiple directories. Pitfalls: the two sources' versions get out of sync, the project must allow all sources,valueFiles path syntax (#9), and revision history and rollback in the UI are more complex.
argocd app manifests --revisions … --source-positions … You can view the rendered result for a specified combination of source revisions.helmCharts feature, keeping a single source.argocd app rollback there are limitations for multi-source; follow the docs.Give selection criteria: external chart + a few values → multi-source; need to patch or combine multiple charts → umbrella chart or Kustomize.
Thinking that valueFiles can take any URL.
See Lesson 2 Module 2.
argocd app rollback and git revert — what is the difference?BeginnerPreferred: git revert: the desired state returns to the previous version, with auditing and reviewability; auto-sync will apply it. argocd app rollback Sync the application to a revision from history, but Git still points at the new version —auto-sync must be turned off first, otherwise the next reconciliation syncs back to the new version; it is suitable for emergencies, and Git must be backfilled afterwards.
Point out that History and Rollback in the UI depends on the application's revision history (revisionHistoryLimit).
“Just kubectl rollout undo” — selfHeal will revert it.
Through tracking information: v3 defaults to annotation argocd.argoproj.io/tracking-id: <app>:<group>/<kind>:<namespace>/<name>; the old label method uses app.kubernetes.io/instance (configurable application.instanceLabelKey); there is also annotation+label. The annotation method is more reliable: labels get copied by other tools onto derived resources (for example, an operator copies labels to objects it creates), causing misjudgment and accidental deletion; label values are also limited to 63 characters.
argocd-cm in application.resourceTrackingMethod; you can opt out (label), and the official docs say there are no plans to remove label tracking.Be able to write out the tracking-id format and use it to troubleshoot “who keeps changing it back” (#12).
“Argo CD tracks resources through ownerReference.”
See Lesson 2 Module 7.
helm install ? Which chart patterns cause problems?AdvancedArgo CD uses helm template to render, then applies by itself: no Helm release (helm list is empty), no helm rollback; Helm hooks are mapped to Argo CD hooks; lookup functions have no cluster access during rendering and return empty; random functions (randAlphaNum) differ on every render, causing permanent OutOfSync; .Release.Name the default release name is the application name (can be overridden with releaseName ); Capabilities.APIVersions depends on the API version information that Argo CD passes in.
argocd-cm configure multiple Kustomize versions.When reviewing a chart, list “GitOps compatibility checks”: no lookup, no random values, hooks have deletion policies, and resource names do not depend on the release revision number.
“Argo CD internally runs helm upgrade.”
With resources-finalizer.argocd.argoproj.io , deleting the application will cascade-delete all resources it manages (default foreground propagation policy: wait until child resources are deleted); without the finalizer, or when using --cascade=false , only the Application object is deleted, and the resources are kept as orphans. -p background lets Kubernetes reclaim child objects in the background.
Delete=false Resources with the annotation are kept when the application is deleted (for example PVCs, namespaces); CreateNamespace=true namespaces that get created are not deleted.preserveResourcesOnDeletion (#28).Prune=false), then the new application takes over (the tracking annotations get rewritten).Point out that deletion is also a change and needs review and approval (in App of Apps, deleting an Application file = deleting workloads).
“Deleting an application does not affect cluster resources” — by default it does.
See Lesson 7 Module 6.
The order service's each release may include a database schema change; requirements: if the migration fails, the new code must not go live; if the new code fails, it must be rollback-able; no data loss allowed.
Key points of the reference answer
BeforeHookCreation, timeout, idempotent); on failure the sync fails and the Deployment is not updated.
15% of the applications on the platform have been OutOfSync for a long time, for various reasons: HPA, Istio injection, operators changing fields, someone manually editing a ConfigMap. Please propose a solution that does not sacrifice GitOps guarantees.
Key points of the reference answer
argocd-cm, application rules go in the Application; track the decline in the number of OutOfSync applications with metrics.Prune=false to protect stateful resources.
No verified video was found that specifically covers Server-Side Diff (v3.6), multi-source Applications and resource tracking methods; follow the official docs.
Browse the questions and focus areas first; click a row to jump to the details.
App of Apps: one parent Application syncs a directory whose contents are child Application manifests — explicit, one file per child application, suited for bootstrapping and collections of heterogeneous applications. ApplicationSet: one template + generators automatically produce Applications — suited for homogeneous fan-out (the same application × multiple clusters / environments / tenants / each PR). In production they are often combined: a root app (App of Apps) manages projects and AppSets, and the AppSets generate business applications.
applicationsSync: create-update and preserveResourcesOnDeletion .argocd appset generate preview.Give a layering: bootstrap (Argo CD itself) → platform (AppSet: per-cluster infrastructure) → teams (AppSet: per team × environment).
“ApplicationSet replaced App of Apps, and the latter is deprecated.”
Generators: List, Cluster (by cluster Secret and labels), Git (directories / files), SCM Provider (repositories in an organization), Pull Request, Cluster Decision Resource, Plugin; plus the combination generators Matrix (Cartesian product, up to two levels) and Merge (merge by key, override defaults). goTemplate uses Go templates + Sprig functions and supports conditions, defaults and nested structures; combined with missingkey=error it makes typos fail immediately (#27).
generators:
- matrix:
generators:
- clusters: {selector: {matchLabels: {env: prod}}}
- git:
repoURL: https://github.com/<you>/gitops-lab
revision: main
directories: [{path: apps/*/overlays/prod}]
selector / templatePatch or a Merge override.templatePatch it can only be used with goTemplate, and does not support modifying spec.project (official Template docs).Mention generator polling and webhooks (#29), and API rate limiting of SCM / PR generators (#49).
“Matrix pairs two lists in order.”
RollingSync groups generated Applications into steps by label (for example dev first, then staging, and prod last, or first a canary cluster); the next step syncs only once the applications in the previous step are all healthy; you can set maxUpdate. It is a Beta feature that needs to be explicitly enabled (applicationsetcontroller.enable.progressive.syncs: "true"); once enabled, the generated applications' sync is controlled by the AppSet (auto-sync is taken over).
strategy:
type: RollingSync
rollingSync:
steps:
- matchExpressions: [{key: env, operator: In, values: [dev]}]
- matchExpressions: [{key: env, operator: In, values: [staging]}]
- matchExpressions: [{key: env, operator: In, values: [prod]}]
maxUpdate: 25%
Split “blast radius control” into three layers: promotion (between environments), RollingSync (between clusters / applications), Rollouts (between Pods); and connect to the Q50 post-mortem.
“RollingSync is a Deployment rolling update.”
See Lesson 3 Module 7.
Hub-spoke (one instance): unified view, unified governance, low operational cost; but the hub holds high-privilege credentials for all clusters (large blast radius), is a single point of failure, needs network access to every cluster's API, and is limited by controller scale. One per cluster: good isolation, pure pull, no cross-network credentials; but governance is scattered, views are scattered, and upgrades happen N times. Compromise: group by region / environment (prod and non-prod separated, one per region), or use an agent-style architecture (centralized control plane, execution plane in each cluster; follow the project's current state).
Be able to connect the “GitOps pull principle” with hub-spoke's “push to remote API” (Q2), and give a phased evolution path.
“One Argo CD can manage any number of clusters with no cost.”
See Lesson 4 Module 6 Hub-and-spoke and one Argo CD per cluster.
argocd cluster add does it do? How do you make the cluster credentials least-privilege?AdvancedIt creates, in the target cluster, argocd-manager a ServiceAccount and ClusterRole/Binding (equivalent to cluster admin by default), takes its token, and generates a cluster Secret in the Argo CD namespace (argocd.argoproj.io/secret-type: cluster). Least privilege: grant only the namespaces needed (the cluster Secret's namespaces field + namespace-level Role), allow only the cluster-level resources needed; use short-lived credentials (cloud Workload Identity / exec plugins, such as AKS Entra authentication, EKS IRSA / Pod Identity); use impersonation so that syncs run as the tenant identity.
argocd Secrets in the namespace; Argo CD RBAC's clusters resource controls who can manage cluster entries via the API.Be able to say “Argo CD's privileges = the union of privileges of everyone who can make Argo CD do things,” so projects, RBAC and Git branch protection are all part of cluster security.
“cluster add just saves the kubeconfig.”
One AppProject per team (or one per team × environment): sourceRepos (only allow the team's repositories and reviewed chart repositories),destinations (team namespace prefix × allowed clusters),clusterResourceWhitelist (usually empty),namespaceResourceBlacklist (forbid platform-managed kinds such as ResourceQuota, LimitRange, NetworkPolicy),roles (team roles and CI tokens),syncWindows,orphanedResources,sourceNamespaces (applications in any namespace).
spec:
sourceRepos: ['https://github.com/acme/team-a-*']
destinations: [{name: '*', namespace: 'team-a-*'}]
clusterResourceWhitelist: []
namespaceResourceBlacklist:
- {group: '', kind: ResourceQuota}
- {group: networking.k8s.io, kind: NetworkPolicy}
roles:
- name: ci
policies: ['p, proj:team-a:ci, applications, sync, team-a/*, allow']
default How should the default project be handled? Tighten it to allow nothing, so new applications do not get loose permissions by default.iat its ID.Point out that the project boundary is validated by Argo CD, and combine it with Kubernetes RBAC / impersonation and admission policies (Kyverno, Gatekeeper) for defense in depth.
“Projects are only for grouping in the UI.”
Casbin policy: p, subject, resource, action, object, allow|deny and g, user or group, role; resources include applications, applicationsets, logs, exec, clusters, repositories, projects, accounts, certificates, gpgkeys, etc.; the object is usually project/application. policy.default is the fallback role,scopes determines which claims are read from the OIDC token as groups. People use SSO groups; automation uses project role tokens or local accounts (apiKey); the admin account is only for break-glass.
logs requires explicit authorization (#35); update/delete no longer inherited by managed resources (#36); the Dex user identifier changes to federated_claims.user_id (#34).override an action (RBAC docs), which can be controlled separately as “whether one can sync to any revision.”argocd admin settings rbac validate / can Put it into CI.Give a minimum-privilege example of an “on-call role”: get, sync, logs, delete Pods, restart Deployments, but cannot modify the application spec.
“Argo CD directly uses Kubernetes RBAC to decide user permissions.”
Risks: ① high privileges of the controller over target clusters; ② repo-server executes untrusted templates and plugins (Helm, Kustomize plugins, CMP); ③ cluster and repository credential Secrets; ④ API/UI exposure and weak authentication; ⑤ people who can write to Git indirectly hold deployment permissions. Hardening: SSO + disable admin, minimum RBAC, tighten default projects, project allowlists, network policies (repo-server only egresses to Git, forbidden from reaching cluster APIs and metadata endpoints), no SA tokens mounted into repo-server, TLS, auditing, timely security patch upgrades, restricting exec resource actions, Git branch protection and signature verification.
Demonstrate the habit of following the official Security docs and CVE advisories, and include Argo CD upgrades in the monthly patch process.
“Argo CD only reads Git, so there are no security risks.”
Sharding: increase the controller StatefulSet replicas; clusters are assigned by the sharding algorithm (default legacy, others include round-robin,consistent-hashing etc.; check the feature-maturity docs for maturity levels); increase controller.status.processors (default 20) and controller.operation.processors (default 10); controller.kubectl.parallelism.limit (default 20); use resource.exclusions to reduce cached resource types; adjust timeout.reconciliation and use webhooks; allocate sufficient memory.
argocd_app_reconcile (duration),workqueue_depth,argocd_cluster_api_resource_objects, memory and OOM (#48); argocd admin cluster stats / shards.Let data speak: measure first (which cluster has the most resources, which application reconciles slowest), then tune; parameter changes also go into Git.
“Change the controller to a Deployment and run 10 replicas” — it relies on sharding and cannot simply be run with multiple replicas.
See Lesson 7 Module 2.
Each revision change requires cloning / fetching and rendering (Helm dependency building, Kustomize, CMP); in a monorepo any commit changes every application's revision, causing everything to re-render. Optimizations: argocd.argoproj.io/manifest-generate-paths annotate to limit relevant paths; scale repo-server horizontally; reposerver.parallelism.limit limit concurrency to prevent OOM; vendor Helm dependencies; adjust timeouts (#43); use webhooks instead of frequent polling; split repos when necessary.
argocd app diff --local --server-side-generate the default included files of *.tpl and Chart.lock were added (local preview is more accurate).Metrics: argocd_repo_pending_request_total,argocd_git_request_total, rendering duration.
“repo-server is just git clone, it won't be slow.”
See Lesson 7 Module 3.
Two layers: Platform health (component availability, restarts / OOM, controller work queue depth and reconciliation duration, repo-server pending requests and Git failure rate, cluster connection status argocd_cluster_connection_status, Redis) and delivery health (argocd_app_info the sync_status / health_status labels of the metric: long-term OutOfSync, Degraded, sync failure rate argocd_app_sync_total). Essential alerts: component unavailable, cluster disconnected, application Degraded > N minutes, sync failure, OutOfSync > N hours (drift), certificate / token about to expire.
sum by (dest_server) (argocd_app_info{health_status="Degraded"}) > 0
increase(argocd_app_sync_total{phase=~"Error|Failed"}[15m]) > 0
argocd_cluster_connection_status == 0
argocd_app_sync_status,argocd_app_health_status,argocd_app_created_time (Q13).Combine DORA metrics with Argo CD metrics (deployment frequency = number of successful production syncs; time to restore = Degraded → Healthy duration); for dashboards and alerts see the next course.
“Looking at the UI is enough.”
See Lesson 7 Module 4.
Chain: source (who can change Git, whether commits are signed) → rendering (chart / dependency sources) → artifacts (image signatures and SBOM) → admission (the cluster rejects unsigned or non-compliant objects). Argo CD: project sourceRepos allowlists, repository credential isolation,Source Integrity (from 3.5 it replaces GnuPG commit signature verification; old configuration still works temporarily, with a warning); image signature verification is delegated to admission control (Kyverno / Sigstore policy-controller / Ratify).
Chart.lock).sbom.tar.gz content changes).Reference the SLSA level thinking; draw “who can change production” as a chain and identify the weak links.
“The repo is private, so the supply chain is secure.”
See Lesson 5 Module 7.
HA: the official HA manifests / chart HA configuration (multi-replica server and repo-server, Redis HA, controller sharding), PodDisruptionBudget and anti-affinity. DR: almost all of Argo CD's “state” can be rebuilt from Git — bootstrap manifests, projects, AppSets and Applications are all in Git; what needs extra backup is credentials (repositories, cluster Secrets, SSO client secrets) and the secrets-tool keys (Sealed Secrets private keys). argocd admin export / import All configuration and applications can be exported.
create-update policy, #28).Be able to say “Argo CD is not the data plane; an outage only affects the ability to make changes,” and define the RTO target by the time to “restore deployment capability.”
“Application data is in Redis, so back up Redis.”
Requirements: a new team submits one PR to get a namespace, project, CI token, and applications for the dev/staging/prod environments; the platform team reviews only one file.
Key points of the reference answer
teams/team-x.yaml (name, repositories, clusters, quotas, SSO groups).teams/*.yaml) generates: namespace + quota + network policy (platform project), AppProject, and the team's application AppSet.create-update + preserveResourcesOnDeletion; team deletion goes through a separate process.
A week before the big sales event there are many releases; in the Argo CD UI, status lags by 5–10 minutes, repo-server occasionally OOMs, and GitHub reports rate limiting. Provide a troubleshooting and scaling plan.
Key points of the reference answer
manifest-generate-paths, GitHub App); repo-server pending requests and memory (scale replicas, parallelism limits, vendoring); controller queue (processor count, sharding).
Please give an actionable plan and an impact assessment for existing applications.
Key points of the reference answer
No verified video was found that specifically covers Source Integrity (a 3.5 feature) or Argo CD disaster recovery drills.
Browse the questions and focus areas first; click a row to jump to the details. [Design] and [Post-mortem] mark the question type.
Topology: separate Argo CD instances for production and non-production (one production instance per region) to reduce blast radius; repositories: a platform repo (bootstrap, projects, clusters, platform components) + team config repos; onboarding: team description file → platform AppSet generates namespaces, projects and team applications; governance: SSO groups → project roles, project allowlists, sync windows, notifications; delivery: PR promotion + Rollouts; observability: metrics, alerts, DORA.
env,region driving the generators.default lock down projects; disable admin.Give an evolution path (pilot with 1 instance → split production → regionalize) and platform SLOs (availability of deployment capability, P95 change-to-effect time).
Talking only about tools and not the organization: no onboarding process, permissions or runbook.
CI only builds and pushes immutable images, and updates dev the image tag in the environment overlay (a direct commit or an auto-merged PR). Promotion = a PR that copies the version already validated in the previous environment (image digest, chart version, configuration) into the next environment's directory, carrying validation evidence (tests, analysis results), with merging controlled by gates (review, sync windows). Tools: scripts / bots that generate PRs, Kargo (promotion orchestration), Image Updater (dev only).
CI build → image@sha256 → PR: overlays/dev → auto-merge → tests → promotion PR: overlays/staging → analysis → promotion PR: overlays/prod (approval + window)
Put promotion evidence (links to test reports, AnalysisRun results) in the PR description to satisfy audits.
“Image Updater automatically updates all environments” — production lacks gates.
Trigger: a refactoring PR changed directories: [{path: apps/*/overlays/prod}] to a non-existent path; the review only looked at the diff, not the generated result. Mechanism: the generator returns empty → default sync policy deletes all generated Applications → the resource finalizer cascades to delete workloads (#28). Mitigation: revert the PR → the root app recreates the AppSet → applications resync; stateful data is restored from backups. Improvements: applicationsSync: create-update + preserveResourcesOnDeletion: true, in CI argocd appset generate compare the generated results and block the merge when the count drops sharply; production AppSet changes require platform approval.
count(argocd_app_info) rate of change).preserveResourcesOnDeletion.Point out that this is a typical case of “changes to control-plane configuration also need progressive rollout.”
“The developer was careless; tell them to be careful next time” — no systemic improvement.
Trigger: a chart upgrade changed the StatefulSet's volumeClaimTemplates to a separate PVC manifest and renamed it (or Kustomize's namePrefix changed); the old PVC disappeared from the desired state → automatic prune deleted it → the StorageClass's reclaimPolicy: Delete reclaim policy deleted the underlying disk. Mitigation: restore from snapshots / backups. Improvements: add argocd.argoproj.io/sync-options: Prune=false,Delete=false (or Prune=confirm), for production StorageClasses use Retain, review deletions in the diff before pruning, manage databases with an operator and apply them separately, and rehearse backup and restore.
Prune=confirm which will make the sync stop at waiting for pruning confirmation of …).Propose an admission policy: reject deletion of PVCs that carry the data-critical=true label, unless they carry an approval annotation.
“Argo CD has a bug” — the behavior matches the configuration.
Order: ①rotate immediately the password (assume it has leaked; change the password first, then clean up the history) → ② assess the exposure (repository visibility, forks, CI logs, Argo CD render cache and argocd app manifests readers of) → ③ fix the desired state (switch to SealedSecret / ExternalSecret) → ④ clean up history (git filter-repo, notify all clones to re-clone; contact the hosting platform to clean cached commit views) → ⑤ improvements: push protection / secret scanning (GitHub secret scanning push protection, pre-commit hooks), scanning gates in CI, and allow only encrypted-format Secrets.
applications, get.Use “ease of rotation” as a criterion for choosing a secrets approach (Q5): ESO + a secret store makes rotation a routine operation.
“Just git revert.”
Mechanism: the controller caches almost all resources for each cluster (#48); the new clusters have huge numbers of objects (tens of thousands of Events, ReplicaSet history, some operator's CRs); a single shard's memory exceeds the limit → OOM → after restart, all cluster caches are rebuilt → OOM again, in a loop. Mitigation: temporarily raise the memory limit, set on the new clusters resource.exclusions or narrow the namespace scope, and add shard replicas. Improvements: a cluster onboarding checklist (argocd admin cluster stats estimate), capacity alerts (memory > 80%, restart count), sharding strategy, and separate instances for very large clusters.
argocd_cluster_api_resource_objects), controller memory, reconciliation duration P95.Propose: “new clusters first join a shadow shard / read-only applications, are observed for 24 hours, and only then migrate into the production instance.”
“Remove the limit.”
Default path: emergency PR (a predefined fast lane: one on-call reviewer + required checks) → merge → webhook triggers immediate sync → verify; the target is to finish within 10 minutes. Break-glass path (Argo CD or Git unavailable, or inside a freeze window): an authorized on-call role temporarily turns off auto-sync / selfHeal for the target application (or enables the window manualSync), performs a controlled manual change, and records it in the incident ticket; within 24 hours after recovery, backfills Git, restores automation, and reviews it in the post-mortem.
applications, update for a specified project); it is not assigned by default and is granted temporarily through approval (JIT).manualSync (#44),argocd app set --sync-policy none usage records, and Kubernetes audit logs.Treat break-glass as “declarative” too: pre-written runbooks, pre-defined roles and commands.
“In an emergency, kubectl edit directly, and forget about it afterwards.”
Separate repositories (the application code repo's CI writes to the config repo, avoiding write-backs triggering its own CI); a bot identity (GitHub App, with write permission only on specific paths of the config repo, or only able to open PRs); concurrency: one file per service + before writing back, git pull --rebase retry, or use a serial queue; idempotency: compare the current value before writing; the commit message includes the source commit SHA and the pipeline link.
for i in 1 2 3 4 5; do git pull --rebase -q && yq -i ".images[0].newTag = \"$TAG\"" apps/podinfo/overlays/dev/kustomization.yaml git diff --quiet && exit 0 # already at the target value: idempotent git commit -qam "podinfo dev -> $TAG (src $GITHUB_SHA)" && git push -q && exit 0 sleep $((i*2)) done; exit 1
argocd app wait --health --sync (a read-only token), or subscribe to notifications / commit status.Mention that Argo CD Image Updater or Kargo can replace a home-written script, but they likewise must handle write-back credentials and branch protection (#46).
“CI force-pushes to main with a personal PAT.”
An ApplicationSet's Pull Request generator (GitHub / GitLab, etc.) generates Applications for open PRs with a specific label: namespace preview-pr-{{.number}}, image tag pr-{{.head_short_sha}}, domain name pr-{{.number}}.preview.example.com; after the PR is closed or merged, the generator no longer returns it and the Application is deleted (here the sync policy must allow deletion).
Write the preview URL back into the PR (a notification or CI comment).
“One cluster per PR.”
See Lesson 3 Module 6.
helm install to Argo CD caused a 15-minute outage. Please write a post-mortem and give the correct migration steps.AdvancedCommon cause: the Argo CD application's releaseName differs from the original Helm release name → the rendered resource names differ → the sync created a new set of resources, and the prune / manual helm uninstall deletion removed the old set; traffic was interrupted while the new Service selector / Ingress was not ready. Correct steps: ① set helm.releaseName to the same as the original release, and confirm argocd app diff only label / annotation differences; ② manual sync (Argo CD takes over the same-named resources and writes tracking annotations); ③ confirm Synced/Healthy; ④ delete Helm's release Secret (sh.helm.release.v1.*) rather than not helm uninstall; ⑤ enable auto-sync.
helm get values), diffing and syncing batch by batch.Emphasize the migration principle: “the diff must be zero (or explainable) before syncing.”
“Run helm uninstall first, then let Argo CD deploy.”
Migrations are versioned artifacts (migration scripts are in the image). Execution options: a PreSync hook Job (simple, tied to the sync) or a CR from a database operator / dedicated migration tool (decoupled, observable). Principles: backward-compatible expand / contract, idempotent, retryable, with timeouts (#19), backup before migration, and migrations and code released in two versions (first expand the schema, then release code that uses the new schema, and finally contract).
Expose migration status as a health signal (custom health check), so that RollingSync / promotion waits for it.
“Migrate automatically at application startup” — concurrent migrations across replicas, and rollbacks are difficult.
Mechanism: the platform components' AppSet fans out to all clusters via the Cluster generator, with auto-sync and no batching, so a single commit reaches all clusters within minutes (GitOps “efficiency” became “blast radius”). Mitigation: revert → thanks to webhooks, rollback is also quick; but because Argo CD itself is also affected by the policy (if the policy blocks Argo CD's traffic to Git or the API), recovery requires break-glass. Improvements: make platform changes progressive too (RollingSync: canary cluster → non-production → production in batches), validate connectivity for policy-type changes first on a canary cluster (PostSync smoke tests), set exemptions for Argo CD's own network paths, and have sync windows avoid peak hours.
Summarize the three layers of blast radius control (Q28) and explain which layer was missing this time.
“GitOps is not suitable for platform components.”
Over the past six months there were 3 incidents amplified by GitOps (similar to Q41, Q42, Q50). Design a set of CI checks and Argo CD configuration to serve as the default safety net for all GitOps repositories.
Key points of the reference answer
argocd appset generate), schema validation (kubeconform), policy checks (Kyverno CLI / conftest: forbid deleting resources with critical labels, forbid namespace: '*'), a generated-output diff summary (counts of added / deleted / modified resources) posted to the PR; a deletion count above the threshold requires additional approval.create-update + preserveResourcesOnDeletion, stateful resources Prune=false,FailOnSharedResource, RollingSync / per-environment AppSets, sync windows, Notifications.
The Argo CD namespace became unavailable due to a bad Helm upgrade; a production service needs an environment variable changed immediately.
Key points of the reference answer
helm rollback Argo CD itself) vs the urgency of the emergency change.kubectl apply apply it directly to the rendered result (kustomize build) → record it.
You have just joined a company and need to assess its GitOps practices within two weeks and provide a roadmap.
Key points of the reference answer
No verified video dedicated to GitOps incident post-mortems was found. It is recommended to replay “mock interview” recordings for self-assessment, and to refer to publicly available post-mortem writing standards.
Filter by keywords (for example commit SHA,allowed destinations,Too long,hook,duplicate,permission denied,decrypt,cached,OOM). Click a number to jump to the details in the corresponding module.
First look at the question and recall the answer yourself, then expand to compare with the one-line key point; for details, return to the “interview question details” in the corresponding module.
argocd app get APP --refresh # re-compare
argocd app get APP --hard-refresh # discard the manifest cache (#43)
argocd app get APP --show-operation # latest operation and message
kubectl -n argocd get application APP -o jsonpath='{range .status.conditions[*]}{.type}: {.message}{"\n"}{end}'
argocd app diff APP [--server-side-diff]
argocd app manifests APP [--source live]
argocd app resources APPargocd app sync APP [--prune] [--async] argocd app wait APP --sync --health --timeout 300 argocd app terminate-op APP # #19 #20 argocd app rollback APP ID # requires auto-sync to be turned off first (Q22) argocd app delete APP --cascade=false # keep resources (Q25) argocd proj windows list PROJ # #44
argocd repo list; argocd repo get URL --refresh hard argocd cert list; ssh-keyscan HOST | argocd cert add-ssh --batch argocd cert add-tls HOST --from ca.pem argocd cluster list; argocd cluster set OLD --name lab2 kind get kubeconfig --name lab2 --internal # #32 argocd admin cluster stats -n argocd
argocd account get-user-info argocd account can-i sync applications 'team-a/*' argocd admin settings rbac can SUBJ ACTION RES OBJ --namespace argocd argocd admin settings rbac validate --namespace argocd argocd proj get PROJ
argocd appset generate appset.yaml -o yaml # preview without applying (#26 #27 #28) argocd appset get NAME kubectl -n argocd logs deploy/argocd-applicationset-controller --tail=50
kubectl -n argocd logs deploy/argocd-repo-server --tail=80 # rendering kubectl -n argocd logs sts/argocd-application-controller --tail=80 # compare / sync kubectl -n argocd logs deploy/argocd-server --tail=80 # API / RBAC kubectl -n argocd get cm argocd-cm argocd-rbac-cm argocd-cmd-params-cm -o yaml kubectl -n argocd rollout restart deploy/argocd-server # restart after params are changed
| Message fragment (v3.6.1) | Location | Issue |
|---|---|---|
Failed to load target state: failed to generate manifest for source N of M | ComparisonError | #7 #8 #9 #42 #43 |
do not match any of the allowed destinations / application repo … is not permitted | InvalidSpecError | #10 #11 |
Namespace for … is missing. | InvalidSpecError | #18 |
one or more objects failed to apply / one or more synchronization tasks are not valid | Operation status | #15 #16 #17 #37 |
waiting for completion of hook … / waiting for healthy state of … | Operation status (Running) | #19 #21 |
another operation is already in progress | CLI / API | #20 |
… is part of applications … and … | SharedResourceWarning | #24 |
Unable to delete application resources: | DeletionError | #25 |
contains applications with duplicate name / failed to execute go template / references project … which does not exist | AppSet ErrorOccurred | #26 #27 #30 |
there are no clusters with this name | InvalidSpecError | #31 |
permission denied: resource, action, object, sub: …, iat: … | CLI / API | #33 #35 #36 |
resource :Kind is not permitted in project / namespace … is not permitted in project | Sync validation | #37 |
… is not permitted to use project … | Applications in any namespace | #38 |
Manifest generation error (cached) | ComparisonError | #43 |
cannot sync: blocked by sync window / Sync operation blocked by sync window | CLI / operation status | #44 |
Each scenario combines several Part A issues. First write down your first diagnostic command and your judgment, then expand the answer.
team-c-api: InvalidSpecError application references project team-c which does not exist (AppSet) team-c-web: ComparisonError … unable to resolve 'master' to a commit SHA team-c-jobs: InvalidSpecError application repo git@github.com:acme/team-c-jobs.git is not permitted in project 'team-c'
Answer: The project synced after the AppSet (#30) → add the project sync-wave: "-1"; the repo's default branch is main (#7); the project lists an HTTPS URL while the application uses SSH (#11), and SSH also needs known_hosts (#5) → standardize the whole organization on HTTPS + a GitHub App credential template (#4).
permission denied: logs, get, team-a/podinfo-dev, sub: alice, iat: … permission denied: applications, delete/Pod/…, team-a/podinfo-dev, … Prometheus: argocd_app_health_status has no data kubectl get cm old-flags -n podinfo-dev → still exists
Answer: Log RBAC (#35), fine-grained permissions not inherited (#36), metrics removed and replaced with argocd_app_info (Q13, Q36), and the first sync after switching to annotation tracking included deletions, causing orphans (#50) → sync all applications once after the upgrade, and manually clean up the orphans. Lesson: check item by item against the Detection list in the upgrade notes.
argocd-repo-server-… OOMKilled ComparisonError … Manifest generation error (cached): … context deadline exceeded GitHub: API rate limit exceeded (PR generator)
Answer: Render timeouts are cached (#43) → hard refresh, vendor Helm dependencies, adjust timeouts and reposerver.parallelism.limit, scale replicas; polling pressure (#49) → webhooks,manifest-generate-paths, GitHub App; the wait chain from push to effect (#29, Figure 4-2).
argocd app diff: replicas 3 ↔ 8; istio-proxy container difference selfHeal: true; HPA minReplicas 3 maxReplicas 10 argocd_app_sync_total +30 per hour
Answer: Git declares a field owned by the HPA + webhook injection (#13) → remove replicas from Git, use ignoreDifferences + RespectIgnoreDifferences=true; default-value differences use Server-Side Diff (#14).
CI: rpc error: code = FailedPrecondition desc = another operation is already in progress Message: waiting for completion of hook batch/Job/db-migrate (after terminating and fixing) networking.k8s.io Ingress … Progressing
Answer: The migration Job has no timeout (#19) → terminate-op and add activeDeadlineSeconds; CI should not actively sync (#20); the Ingress controller in kind / the new cluster did not write back an address (#21).
argocd cluster list: https://127.0.0.1:41893 Unknown … connection refused InvalidSpecError … there are no clusters with this name: lab2 (after the fix) resource :Namespace is not permitted in project team-a
Answer: kind's host address (#32) → --internal kubeconfig; the cluster name is kind-lab2 (#31) → argocd cluster set … --name lab2; the chart includes a Namespace while the project forbids cluster-level resources (#37) → use CreateNamespace=true or create it at the platform layer.
SealedSecret event: Resource "db-cred" already exists and is not managed by SealedSecret another namespace: Failed to unseal: no key could decrypt secret (password) The Application has the argocd-image-updater.argoproj.io/image-list annotation; podinfo is a plain YAML directory
Answer: The old Secret was not taken over (#40); the ciphertext was copied to another namespace / cluster (#39); Image Updater v1.x uses ImageUpdater a CR and does not support plain YAML applications (#46) → switch to a Kustomize overlay.
cannot sync: blocked by sync window podinfo-prod Degraded for 25 minutes, no Slack messages Someone ran kubectl set env … ; it was reverted 2 minutes later
Answer: A deny window (#44) → break-glass process (Q45: temporarily manualSync, record, backfill); notifications lack the subscription annotation (#47); selfHeal reverting manual changes is GitOps' expected behavior (Q6) — an emergency PR should be submitted instead.
Each question has a 2-minute countdown: first answer verbally (you can write key points in the text box), then expand the reference answer and self-rate “answered / partial / don't know.” At the end, this round's score is shown, along with the cumulative mastery rate by module. Self-assessment results are saved in this browser.
| Item | Facts used in this lesson | Source (accessed 2026-11-17) |
|---|---|---|
| Argo CD | v3.6.1 (2026-11-04), v3.6.0 (2026-11-03); concurrently maintained: v3.5.7, v3.4.13; Kubernetes versions tested for 3.6: v1.37, v1.36, v1.35, v1.34 | argo-cd releases · source code of v3.6.1's docs/operator-manual/tested-kubernetes-versions.md
|
| Helm chart | argo/argo-cd 10.18.0 (2026-11-11), appVersion v3.6.1,kubeVersion: ">=1.25.0-0" | argo-helm(Chart.yaml) |
| Error and status messages | Text in this lesson marked “source-verified” has been checked word for word against the format strings in the v3.6.1 source: util/argo/argo.go,controller/state.go,controller/sync.go,controller/appcontroller.go,gitops-engine/pkg/sync/sync_context.go,gitops-engine/pkg/health/*.go,applicationset/controllers/applicationset_controller.go,applicationset/utils/utils.go,util/git/client.go,util/app/path/path.go,util/app/discovery/discovery.go,util/rbac/rbac.go,reposerver/repository/repository.go,server/application/application.go | argo-cd@v3.6.1 |
| Upgrade notes | 2.14→3.0 (fine-grained RBAC, log RBAC, default resource.exclusions, metric removal, Dex sub, old repository configuration removed, Helm upgrade, annotation tracking, ignoring status and ignoreDifferences updates), 3.2→3.3 (ApplicationSet CRD requires server-side apply, Helm 3.19.2, Kustomize 5.8.0), 3.4→3.5 (Helm 4.2.0, impersonation extension, SSH known_hosts, GnuPG → Source Integrity, repo-server mTLS), 3.5→3.6 (OpenTelemetry, local include defaults, SSA uses Server-Side Diff, progressive sync relies on annotations, health checks during deletion) | Upgrading(source docs/operator-manual/upgrading/) |
| Default parameters | timeout.reconciliation: 120s,timeout.reconciliation.jitter: 60s; controller.status.processors: "20",controller.operation.processors: "10",controller.kubectl.parallelism.limit: "20",controller.repo.server.timeout.seconds: "60",controller.sharding.algorithm: legacy (round-robin and consistent-hashing are Alpha),reposerver.default.cache.expiration: 24h; ARGOCD_EXEC_TIMEOUT default 90s; Git generator requeueAfterSeconds default 180; progressive sync is Beta and must be explicitly enabled | Source docs: argocd-cm.yaml, argocd-cmd-params-cm.yaml, config-management-plugins.md, Generators-Git.md, Progressive-Syncs.md, feature-maturity.md |
| CLI | Commands and parameters used in this lesson (argocd appset generate -o,argocd app diff --server-side-diff,argocd app delete --cascade --wait,argocd admin settings rbac can … --namespace,argocd proj windows add --kind --schedule --duration --applications,argocd cluster set --name,argocd repo get --refresh hard ) are all present in the v3.6.1 command reference docs; CLI error exit codes ErrorGeneric = 20 | source docs/user-guide/commands/
|
| Related projects | Argo Rollouts v1.10.2; Argo CD Image Updater v1.5.0 (README: uses ImageUpdater CR, only supports Kustomize / Helm / Plugin applications); Sealed Secrets v0.41.2 (ErrUnsealFailed,no key could decrypt secret,already exists and is not managed by SealedSecret); External Secrets Operator v2.15.0 (API external-secrets.io/v1,SecretSyncedError); Kargo v1.12.6; Flux v2.10.0; kind v0.33.0 (default kindest/node:v1.37.0); podinfo 6.17.0 | Each project's GitHub releases and source code |
All videos were verified on 2026-11-17 via the YouTube oEmbed endpoint (https://www.youtube.com/oembed?url=…&format=json), checking titles and channels; oEmbed does not return duration or publication dates, so they are not shown. Verified: Octopus Deploy “5 common Argo CD issues and how to fix them” (za_SNwjXehM), “Why Argo CD Breaks at Scale (and How to Avoid It)” (_vxZgonkCAU); TechWorld with Nana “ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes” (MeU5_k9ssrs), “What is GitOps, How GitOps works and Why it's so useful” (f5EpcWp0THw); DevOps & AI Toolkit “Mastering Argo CD Sync Waves: A Deep Dive into Effective GitOps Synchronization Strategies” (LKuRtOTvlXk), “GitOps Without Pipelines With ArgoCD Image Updater” (avPUQin9kzU), “Argo Rollouts - Canary Deployments Made Easy In Kubernetes” (84Ky0aPbHvY), “Bitnami Sealed Secrets - How To Store Kubernetes Secrets In Git Repositories” (xd2QoV6GJlc), “Manage Kubernetes Secrets With External Secrets Operator (ESO)” (SyRZe5YVCVk); Codefresh “Argo CD Ignore Differences” (VMvbVF1xEUU); CNCF “Multi-cluster, multi-apps, multi-value deployments using Argo CD Application Sets - Kostis Kapelonis” (7hJvZaqiG5s), “Mastering Efficiency in Argo CD: Scaling Smarter, Not Costlier - Alexander Matyushentsev, Akuity” (bpsclYlGl2s); Ashok Kumar “🔐 ArgoCD User Management & RBAC Explained 👥 | Create Users, Passwords & Okta SSO 🌐” (NPIo1c5LXI8), “🔥 Top10 ArgoCD InterviewQuestions & Answers | GitOps 🚀 Kubernetes 🎯 DevOps” (bpDOtB1Toxk); Akuity “Argo CD Tutorial: App of Apps in 8 Minutes” (2pvGL0zqf9o), “Introducing Kargo with Jesse Suen and Kelsey Hightower” (yaZc0DdeLKk), “Kargo 1.0: Live Demo + GitOps Workflow Panel” (GvGt0yuApvE); Anton Putra “ArgoCD Notifications (Successful/Failed Deployments)” (OP6IRsNiB4w); DevOps Journey “Argo Rollouts in 15 minutes!” (w3xdopP4aEk); Twain Taylor “The 4 key principles of OpenGitOps” (culqnmWWoVs); Trustscrin CloudLab “Argo CD vs Flux Explained: Which GitOps Tool Should You Use?” (qcT5rRSRhoU); Chris Matcham “I Ditched ArgoCD for FluxCD (Here's What Happened)” (SaxkgUyqflc); VMblog “Octopus Deploy’s Dan Garfield on Argo CD, Guardrails, and Octo Doctor | KubeCon NA 2026” (0zHJJDCBmyY). Not found No verified videos specifically covering Ingress redirect loops, known_hosts / private CA, multi-source $values, Server-Side Diff (v3.6), annotations too long, deleting finalizers, kind multi-cluster networking, Applications in any namespace, CMP troubleshooting, cached render errors, sync window break-glass, 3.3 CRD upgrades, Source Integrity and GitOps incident post-mortems were found; the related pages provide storyboard scripts or notes instead. Third-party videos may be based on v2 or reflect an author's or vendor's stance; use them for reference only.
The “Audio” page uses the browser's built-in Web Speech API (Chinese zh-CN, English terms en-US); no data is uploaded, and the course contains no embedded audio. A Chinese voice pack must be installed on the system; without one, read the script directly or pass it to another TTS tool.
rpc error: code = … desc = …, Go TLS / net errors, go-git's authentication required, x/crypto/ssh's knownhosts: key is unknown, Kubernetes API's namespaces "…" not found, Helm / text/template inner wording) vary with version and transport method.
argocd repo list,argocd cluster list,argocd appset get) are organized from the documentation examples and were not checked word for word against the actual v3.6.1 print format.
argocd app diff the diff format, and in #23 the ignored (requires pruning) message, in #36 the action string format, in #45 the Rollouts output, in #46 the Image Updater logs and CRD resource names, and in #40 the way takeover annotations are written — all follow the current docs of the corresponding project.
acme,example.com) are examples.