# ContentsInstall and access · Login and accounts · Applications · Sync and rollback · Projects · Clusters and repos · Admin · Application spec · Sync options · Annotations · Hooks and waves · Health and diffing · RBAC · ApplicationSets · Helm, Kustomize, multi-source · Rollouts · Image Updater · Notifications · Secrets · Scaling · Flux vs Argo CD · Errors · Top 15
# Install and accessTask Command Install (manifests, non-HA) kubectl create ns argocd && kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlInstall HA manifests same with .../manifests/ha/install.yaml Core mode (no UI/API server) .../manifests/core-install.yaml, then argocd login --coreInstall with Helm helm upgrade --install argocd argo/argo-cd -n argocd --create-namespace -f values.yamlInitial admin password argocd admin initial-password -n argocdSame, raw kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -dPort-forward UI/API kubectl -n argocd port-forward svc/argocd-server 8080:443Local dashboard in core mode argocd admin dashboard -n argocdInstall CLI (Linux) curl -sSL -o argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64 && sudo install -m 555 argocd /usr/local/bin/
# Login and accountsTask Command Login (TLS, self-signed) argocd login argocd.example.com --username admin --insecureLogin through plaintext port-forward argocd login localhost:8080 --plaintextLogin via SSO argocd login argocd.example.com --ssoBehind an L7 proxy without HTTP/2 add --grpc-web Current user and permissions argocd account get-user-info, argocd account can-i sync applications 'team-a/*'Change password argocd account update-passwordToken for a local CI account argocd account generate-token --account ci --expires-in 720hProject role token argocd proj role create-token team-a ci --expires-in 720hUse a token export ARGOCD_AUTH_TOKEN=...; export ARGOCD_SERVER=argocd.example.com
# Application commandsTask Command Create from Git path argocd app create web --repo https://github.com/org/cfg.git --path apps/web --dest-server https://kubernetes.default.svc --dest-namespace web --project team-aCreate from Helm repo argocd app create redis --repo https://charts.bitnami.com/bitnami --helm-chart redis --revision 20.1.0 --dest-namespace redis --dest-server https://kubernetes.default.svcCreate or update from file argocd app create -f app.yaml --upsert (or kubectl apply -f app.yaml)List / filter argocd app list -p team-a -l env=prod -o wideDetails, tree of resources argocd app get web, argocd app resources webDiff Git vs live argocd app diff web (exit 1 if diff)Diff local files vs live argocd app diff web --local ./apps/webRendered manifests argocd app manifests web --source git (or live)Set Helm parameter / values file argocd app set web -p image.tag=1.4.2, --values values-prod.yamlSet Kustomize image argocd app set web --kustomize-image ghcr.io/org/web:1.4.2Enable auto-sync argocd app set web --sync-policy automated --auto-prune --self-healDisable auto-sync argocd app set web --sync-policy noneLogs of a workload argocd app logs web --kind Deployment --name web --tail 100 -fRun a resource action argocd app actions run web restart --kind Deployment --resource-name webDelete app and resources argocd app delete web --cascadeDelete app, keep resources argocd app delete web --cascade=falseWait for state argocd app wait web --sync --health --timeout 600
# Sync, refresh and rollbackTask Command Sync argocd app sync webSync with prune / dry run argocd app sync web --prune, --dry-runSync a single resource argocd app sync web --resource apps:Deployment:webSync a specific revision argocd app sync web --revision 3f2a1bcForce replace (delete + create) argocd app sync web --force --replaceServer-side apply for one sync argocd app sync web --server-sideSync with retries argocd app sync web --retry-limit 3 --retry-backoff-duration 10sNormal refresh (re-diff) argocd app get web --refreshHard refresh (drop manifest cache) argocd app get web --hard-refreshStop a running operation argocd app terminate-op webHistory argocd app history webRoll back to history ID (auto-sync must be off) argocd app rollback web 12Refresh via kubectl kubectl -n argocd annotate app web argocd.argoproj.io/refresh=hard --overwrite
# ProjectsTask Command Create argocd proj create team-a -d https://kubernetes.default.svc,team-a-* -s https://github.com/org/*Add destination / source argocd proj add-destination team-a https://kubernetes.default.svc team-a-dev, argocd proj add-source team-a https://github.com/org/cfg.gitAllow a cluster-scoped kind argocd proj allow-cluster-resource team-a "" NamespaceDeny a namespaced kind argocd proj deny-namespace-resource team-a "" ResourceQuotaCreate role + policy argocd proj role create team-a ci && argocd proj role add-policy team-a ci -a sync -o '*' -p allowBind SSO group to role argocd proj role add-group team-a ci my-org:team-aSync window (deny nights) argocd proj windows add team-a --kind deny --schedule "0 22 * * *" --duration 8h --applications '*' --manual-syncList windows argocd proj windows list team-a
# Clusters and reposTask Command Register cluster from kubeconfig context argocd cluster add prod-eu --name prod-eu --label env=prodList / remove argocd cluster list, argocd cluster rm prod-euRotate the argocd-manager token argocd cluster rotate-auth prod-euAdd HTTPS repo argocd repo add https://github.com/org/cfg.git --username git --password $TOKENAdd SSH repo argocd repo add [email protected] :org/cfg.git --ssh-private-key-path ~/.ssh/argocdAdd GitHub App repo argocd repo add https://github.com/org/cfg.git --github-app-id 123 --github-app-installation-id 456 --github-app-private-key-path app.pemCredential template for all org repos argocd repocreds add https://github.com/org --username git --password $TOKENHelm OCI repo argocd repo add ghcr.io/org/charts --type helm --name org-charts --enable-oci --username u --password $TOKENKnown hosts ssh-keyscan github.com | argocd cert add-ssh --batch
Declarative cluster and repo Secrets:
yaml Copy
apiVersion : v1
kind : Secret
metadata :
name : prod-eu
namespace : argocd
labels :
argocd.argoproj.io/secret-type : cluster
env : prod
stringData :
name : prod-eu
server : https://ABC123.gr7.eu-west-1.eks.amazonaws.com
config : |
{
"awsAuthConfig": { "clusterName": "prod-eu", "roleARN": "arn:aws:iam::111122223333:role/argocd-deployer" },
"tlsClientConfig": { "caData": "LS0tLS1CRUdJTi..." }
}
---
apiVersion : v1
kind : Secret
metadata :
name : org-repos
namespace : argocd
labels :
argocd.argoproj.io/secret-type : repo-creds
stringData :
type : git
url : https://github.com/org
githubAppID : " 123456 "
githubAppInstallationID : " 7890123 "
githubAppPrivateKey : |
-----BEGIN RSA PRIVATE KEY-----
... # Admin and debuggingTask Command Export everything (backup) argocd admin export -n argocd > argocd-backup.yamlImport argocd admin import -n argocd - < argocd-backup.yamlTest an RBAC decision argocd admin settings rbac can role:dev sync applications 'team-a/web' --policy-file policy.csvValidate RBAC file argocd admin settings rbac validate --policy-file policy.csvTest a Lua health check argocd admin settings resource-overrides health ./cert.yaml --argocd-cm-path ./argocd-cm.yamlTest ignoreDifferences argocd admin settings resource-overrides ignore-differences ./deploy.yaml --argocd-cm-path ./argocd-cm.yamlShard distribution argocd admin cluster shards -n argocdCluster cache stats argocd admin cluster stats -n argocdGenerate an Application spec argocd admin app generate-spec web --repo ... --path ... --dest-namespace web --dest-server https://kubernetes.default.svcController logs for one app kubectl -n argocd logs sts/argocd-application-controller | grep 'application=argocd/web'Repo-server logs kubectl -n argocd logs deploy/argocd-repo-server --tail 200Restart components after config change kubectl -n argocd rollout restart deploy/argocd-server deploy/argocd-repo-server sts/argocd-application-controller
# Application specyaml Copy
apiVersion : argoproj.io/v1alpha1
kind : Application
metadata :
name : web-prod
namespace : argocd
finalizers :
- resources-finalizer.argocd.argoproj.io # cascade delete
annotations :
argocd.argoproj.io/manifest-generate-paths : . # webhook refresh only on changes here
spec :
project : team-a
source :
repoURL : https://github.com/org/cfg.git
targetRevision : main # branch, tag, SHA, or semver range for Helm charts
path : apps/web/overlays/prod
destination :
name : prod-eu # or server: https://...
namespace : web
syncPolicy :
automated :
prune : true
selfHeal : true
allowEmpty : false
syncOptions :
- CreateNamespace=true
- ServerSideApply=true
- PruneLast=true
- RespectIgnoreDifferences=true
managedNamespaceMetadata :
labels :
team : team-a
retry :
limit : 5
backoff : { duration : 5s , factor : 2 , maxDuration : 3m }
ignoreDifferences :
- group : apps
kind : Deployment
jsonPointers : [ /spec/replicas ]
- group : admissionregistration.k8s.io
kind : MutatingWebhookConfiguration
jqPathExpressions : [ ' .webhooks[]?.clientConfig.caBundle ' ]
revisionHistoryLimit : 10 Status Values Sync Synced, OutOfSync, UnknownHealth Healthy, Progressing, Degraded, Suspended, Missing, UnknownOperation phase Running, Succeeded, Failed, Error, Terminating
# Sync optionsOption Where Effect CreateNamespace=trueapp Create destination namespace if missing ServerSideApply=trueapp or resource Use server-side apply (large CRDs, field ownership) ServerSideDiff=truecompare-options Diff via API server dry-run (fewer false OutOfSync) PruneLast=trueapp or resource Prune after all waves are healthy Prune=falseresource Never prune this resource Prune=confirm / Delete=confirmresource Require manual confirmation Delete=falseresource Keep resource when the app is deleted ApplyOutOfSyncOnly=trueapp Apply only changed resources (big apps) Replace=trueapp or resource kubectl replace/create instead of applyForce=trueresource (with Replace) Delete and recreate (immutable fields) Validate=falseapp or resource Skip schema validation SkipDryRunOnMissingResource=trueapp or resource Do not dry-run kinds whose CRD is not installed yet PrunePropagationPolicy=foregroundapp foreground, background, orphanRespectIgnoreDifferences=trueapp Do not overwrite ignored fields on sync FailOnSharedResource=trueapp Fail if a resource is managed by another app
# AnnotationsAnnotation Purpose argocd.argoproj.io/sync-wave: "-1"Ordering within a phase (default 0) argocd.argoproj.io/hook: PreSyncPreSync, Sync, PostSync, SyncFail, PostDelete, Skipargocd.argoproj.io/hook-delete-policy: HookSucceededBeforeHookCreation (default), HookSucceeded, HookFailedargocd.argoproj.io/sync-options: Prune=false,ServerSideApply=truePer-resource sync options argocd.argoproj.io/compare-options: IgnoreExtraneousExclude from app sync status (generated resources) argocd.argoproj.io/compare-options: ServerSideDiff=trueServer-side diff for this app argocd.argoproj.io/tracking-idWritten by Argo CD in annotation tracking mode (default in 3.x) argocd.argoproj.io/refresh: normal|hardTrigger refresh on an Application argocd.argoproj.io/manifest-generate-pathsPaths whose changes trigger refresh from webhooks argocd.argoproj.io/skip-reconcile: "true"Pause reconciliation of an Application notifications.argoproj.io/subscribe.on-sync-failed.slack: deploysNotification subscription
# Hooks and wavesyaml Copy
apiVersion : batch/v1
kind : Job
metadata :
name : db-migrate
annotations :
argocd.argoproj.io/hook : PreSync
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation,HookSucceeded
argocd.argoproj.io/sync-wave : " -1 "
spec :
backoffLimit : 1
activeDeadlineSeconds : 600
template :
spec :
restartPolicy : Never
containers :
- name : migrate
image : ghcr.io/org/api:1.4.2
command : [ " ./migrate " , " up " ] Order: PreSync, then Sync by wave (low to high), then PostSync. Within a wave: kind order (Namespace, CRD, ServiceAccount, RBAC, ConfigMap, Secret, Service, workloads, Ingress...), then name. Each wave must be healthy before the next. SyncFail hooks run when the sync fails. Helm pre-install/pre-upgrade map to PreSync, post-install/post-upgrade to PostSync.
# Health and diffingargocd-cm custom health in Lua:
yaml Copy
data :
resource.customizations.health.cert-manager.io_Certificate : |
hs = { status = "Progressing", message = "Waiting for certificate" }
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
elseif c.type == "Ready" and c.status == "False" then
hs.status = "Degraded"; hs.message = c.message
end
end
end
return hs
resource.customizations.ignoreDifferences.all : |
managedFieldsManagers:
- kube-controller-manager
resource.customizations.ignoreDifferences.apps_Deployment : |
jsonPointers:
- /spec/replicas
resource.exclusions : |
- apiGroups: ["cilium.io"]
kinds: ["CiliumIdentity"]
clusters: ["*"]
resource.customizations.ignoreResourceUpdates.all : |
jsonPointers:
- /status Key in argocd-cm Use resource.customizations.health.<group>_<kind>Lua health check resource.customizations.actions.<group>_<kind>Custom UI/CLI actions in Lua resource.customizations.ignoreDifferences.<group>_<kind> / .allGlobal diff ignores resource.customizations.ignoreResourceUpdates.<group>_<kind>Skip reconciles on noisy updates resource.exclusions / resource.inclusionsWhich kinds the controller watches resource.compareoptionse.g. ignoreAggregatedRoles: true timeout.reconciliationPolling interval (default 180s) application.resourceTrackingMethodlabel, annotation, annotation+labelkustomize.buildOptionse.g. --enable-helm --load-restrictor LoadRestrictionsNone
# RBACargocd-rbac-cm:
yaml Copy
data :
policy.default : role:readonly
scopes : " [groups, email] "
policy.csv : |
# p, subject, resource, action, object, effect
p, role:team-a-dev, applications, get, team-a/*, allow
p, role:team-a-dev, applications, sync, team-a/*-dev, allow
p, role:team-a-dev, applications, action/*, team-a/*-dev, allow
p, role:team-a-dev, logs, get, team-a/*, allow
p, role:team-a-dev, applications, sync, team-a/*-prod, deny
g, my-org:team-a, role:team-a-dev
g, [email protected] , role:admin Resources Actions applications, applicationsets, logs, execget, create, update, delete, sync, override, action/<group>/<kind>/<action>clusters, projects, repositories, accounts, certificates, gpgkeysget, create, update, deleteextensionsinvoke
Built-in roles: role:readonly, role:admin. Deny wins over allow. App objects are <project>/<app> (or <project>/<namespace>/<app> for apps in any namespace).
# ApplicationSetsGenerator Iterates Key params listFixed elements any keys you define clustersCluster Secrets (plus in-cluster) filtered by selector name, server, metadata.labels.<k>, values.<k>git directoriesFolders matching path (with exclude) path.path, path.basename, path.segmentsgit filesJSON/YAML files matching path file keys, path.path matrixCartesian product of 2 generators params from both mergeMerge generators on mergeKeys overrides by key scmProviderRepos in a GitHub/GitLab org repository, branch, urlpullRequestOpen PRs number, branch, head_shaclusterDecisionResourceExternal placement (OCM) from the CR status pluginYour HTTP service anything returned
yaml Copy
apiVersion : argoproj.io/v1alpha1
kind : ApplicationSet
metadata :
name : guestbook
namespace : argocd
spec :
goTemplate : true
goTemplateOptions : [ " missingkey=error " ]
generators :
- matrix :
generators :
- clusters :
selector :
matchLabels :
env : prod
- git :
repoURL : https://github.com/org/cfg.git
revision : main
directories :
- path : apps/*
template :
metadata :
name : " {{ .path.basename }}-{{ .name }} "
spec :
project : platform
source :
repoURL : https://github.com/org/cfg.git
targetRevision : main
path : " {{ .path.path }} "
destination :
server : " {{ .server }} "
namespace : " {{ .path.basename }} "
syncPolicy :
preserveResourcesOnDeletion : true
applicationsSync : create-update # create-only | create-update | create-delete | sync
strategy :
type : RollingSync
rollingSync :
steps :
- matchExpressions :
- { key : env , operator : In , values : [ staging ]}
- matchExpressions :
- { key : env , operator : In , values : [ prod ]}
maxUpdate : 25% # Helm, Kustomize and multiple sourcesyaml Copy
# Helm chart from a repo, values from Git (multiple sources)
spec :
sources :
- repoURL : https://prometheus-community.github.io/helm-charts
chart : kube-prometheus-stack
targetRevision : 65.1.1
helm :
releaseName : monitoring
valueFiles :
- $values/platform/monitoring/values-prod.yaml
- repoURL : https://github.com/org/cfg.git
targetRevision : main
ref : values
---
# Helm chart in Git with inline overrides
spec :
source :
repoURL : https://github.com/org/cfg.git
path : charts/web
helm :
valueFiles : [ values.yaml , values-prod.yaml ]
ignoreMissingValueFiles : true
valuesObject :
replicaCount : 4
parameters :
- name : image.tag
value : " 1.4.2 "
---
# Kustomize overlay with overrides
spec :
source :
repoURL : https://github.com/org/cfg.git
path : apps/web/overlays/prod
kustomize :
images :
- ghcr.io/org/web:1.4.2
namePrefix : prod-
commonLabels :
team : team-a Helm in Argo CD = helm template: no release Secret, helm list is empty, lookup returns nothing, .Capabilities comes from the target cluster's API versions, and Helm hooks become Argo CD hooks.
# Argo RolloutsTask Command Install kubectl create ns argo-rollouts && kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yamlWatch kubectl argo rollouts get rollout web -n prod --watchStatus (exit code for CI) kubectl argo rollouts status web -n prod --timeout 10mPromote one step / fully kubectl argo rollouts promote web, --fullAbort / retry kubectl argo rollouts abort web, kubectl argo rollouts retry rollout webUndo to previous revision kubectl argo rollouts undo webRestart pods kubectl argo rollouts restart webDashboard kubectl argo rollouts dashboardAnalysis runs kubectl get analysisrun -n prod, kubectl describe analysisrun <name>
yaml Copy
apiVersion : argoproj.io/v1alpha1
kind : Rollout
metadata : { name : web }
spec :
replicas : 10
selector : { matchLabels : { app : web }}
template : { ... } # or workloadRef to an existing Deployment
strategy :
canary :
canaryService : web-canary
stableService : web-stable
trafficRouting :
nginx :
stableIngress : web
analysis : # background analysis from step 1
templates : [{ templateName : success-rate }]
startingStep : 1
args : [{ name : service , value : web-canary }]
steps :
- setWeight : 10
- pause : { duration : 2m }
- setWeight : 50
- pause : {} # manual gate
---
apiVersion : argoproj.io/v1alpha1
kind : AnalysisTemplate
metadata : { name : success-rate }
spec :
args : [{ name : service }]
metrics :
- name : success-rate
interval : 1m
count : 5
failureLimit : 1
successCondition : result[0] >= 0.99
provider :
prometheus :
address : http://prometheus.monitoring:9090
query : |
sum(rate(http_requests_total{service="{{args.service}}",code!~"5.."}[2m]))
/
sum(rate(http_requests_total{service="{{args.service}}"}[2m])) Blue-green essentials: activeService, previewService, autoPromotionEnabled: false, prePromotionAnalysis, postPromotionAnalysis, scaleDownDelaySeconds (default 30).
# Image UpdaterAnnotation (on the Application) Example argocd-image-updater.argoproj.io/image-listweb=ghcr.io/org/webargocd-image-updater.argoproj.io/web.update-strategysemver (also digest and newest-build / alphabetical style strategies)argocd-image-updater.argoproj.io/web.allow-tagsregexp:^1\.[0-9]+\.[0-9]+$argocd-image-updater.argoproj.io/web.helm.image-name / .helm.image-tagimage.repository / image.tagargocd-image-updater.argoproj.io/write-back-methodargocd (parameter override) or gitargocd-image-updater.argoproj.io/git-branchmain or main:image-updates (push to a separate branch)
Git write-back creates .argocd-source-<app>.yaml next to the app's path. Only Helm and Kustomize sources are supported. Newer releases (1.x) move this configuration into an ImageUpdater custom resource.
# Notificationsyaml Copy
# argocd-notifications-cm
data :
service.slack : |
token: $slack-token # key in argocd-notifications-secret
template.app-sync-failed : |
message: "{{.app.metadata.name}} sync failed at {{.app.status.operationState.syncResult.revision}}: {{.app.status.operationState.message}}"
trigger.on-sync-failed : |
- when: app.status.operationState.phase in ['Error', 'Failed']
send: [app-sync-failed]
trigger.on-health-degraded : |
- when: app.status.health.status == 'Degraded'
oncePer: app.status.sync.revision
send: [app-health-degraded] Subscribe with notifications.argoproj.io/subscribe.on-sync-failed.slack: deploys on an Application or AppProject. Test with argocd admin notifications template notify app-sync-failed web -n argocd.
# SecretsTask Command Fetch Sealed Secrets cert kubeseal --fetch-cert > pub-cert.pemSeal a Secret kubectl create secret generic db --from-literal=password=s3cr3t -n app --dry-run=client -o yaml | kubeseal --cert pub-cert.pem -o yaml > db-sealed.yamlSeal one value echo -n s3cr3t | kubeseal --raw --namespace app --name db --from-file=/dev/stdinScope --scope strict (default), namespace-wide, cluster-wideRe-encrypt with newest key kubeseal --re-encrypt < db-sealed.yaml > tmp && mv tmp db-sealed.yamlBack up keys kubectl -n kube-system get secret -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml > keys.yamlSOPS encrypt with age sops --encrypt --age age1... --encrypted-regex '^(data|stringData)$' --in-place secret.yamlSOPS decrypt / edit sops -d secret.yaml, sops secret.yamlGenerate an age key age-keygen -o key.txt
yaml Copy
# External Secrets Operator
apiVersion : external-secrets.io/v1
kind : ExternalSecret
metadata : { name : db , namespace : app }
spec :
refreshInterval : 1h
secretStoreRef : { name : aws-sm , kind : ClusterSecretStore }
target : { name : db , creationPolicy : Owner }
data :
- secretKey : password
remoteRef : { key : prod/app/db , property : password }
---
# .sops.yaml
creation_rules :
- path_regex : envs/prod/.*\.yaml
encrypted_regex : ^(data|stringData)$
kms : arn:aws:kms:eu-west-1:111122223333:key/abcd-1234
- path_regex : .*\.yaml
encrypted_regex : ^(data|stringData)$
age : age1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs3290gq # Scaling and tuningSetting (argocd-cmd-params-cm unless noted) Default Use controller.status.processors20 Raise for many apps (e.g. 50 per 1000 apps) controller.operation.processors10 Concurrent syncs controller.repo.server.timeout.seconds60 Slow Helm/Kustomize renders controller.sharding.algorithmlegacyround-robin, consistent-hashingARGOCD_CONTROLLER_REPLICAS (env on controller)1 Must equal StatefulSet replicas for sharding controller.kubectl.parallelism.limit20 Concurrent kubectl operations reposerver.parallelism.limit0 (unlimited) Cap concurrent renders to avoid OOM ARGOCD_EXEC_TIMEOUT (env on repo-server)90s Timeout for helm/kustomize/git exec application.namespacesnone Enable apps in any namespace server.insecurefalse Terminate TLS at the ingress timeout.reconciliation (argocd-cm)180s Raise when webhooks are configured
Pin a cluster to a shard: add shard: "2" to the cluster Secret's data.
# Flux vs Argo CDArgo CD Flux Model Application CRD, central controller GitRepository + Kustomization + HelmRelease CRDs UI Built-in UI, SSO, RBAC No built-in UI (third-party UIs exist) Multi-cluster Hub-and-spoke from one instance Usually one Flux per cluster Helm helm template + apply, no releaseReal Helm SDK releases, helm list works Ordering Sync waves and hooks dependsOn between Kustomizations/HelmReleasesTemplating fleets ApplicationSet Kustomize overlays, postBuild.substitute Secrets Plugins for SOPS; Sealed/External Secrets Native SOPS decryption in Kustomization Image automation Image Updater (separate) image-reflector + image-automation controllers Tenancy AppProjects + RBAC Service account impersonation per Kustomization Bootstrap kubectl apply root appflux bootstrap github --owner org --repository fleet --path clusters/prod
# Common errorsError Fix ComparisonError: ... Manifest generation error (cached)Fix the render error, then argocd app get <app> --hard-refresh application repo <url> is not permitted in project '<p>'Add the exact URL to sourceRepos ... do not match any of the allowed destinations in project '<p>'Add the server/name and namespace to destinations resource <group>:<kind> is not permitted in project <p>Whitelist the kind or remove it from the app permission denied: applications, sync, <proj>/<app>, sub: ...RBAC policy or group mapping missing; test with rbac can rollback cannot be initiated when auto-sync is enabledDisable auto-sync or, better, git revert another operation is already in progressWait, or argocd app terminate-op <app> metadata.annotations: Too long: must have at most 262144 bytesServerSideApply=true (or Replace=true for that resource)field is immutableChange the name, or Replace=true,Force=true on that resource no matches for kind "X" in version "Y"Install the CRD in an earlier wave, SkipDryRunOnMissingResource=true rpc error: code = DeadlineExceeded desc = context deadline exceededRepo-server slow: raise timeouts, scale repo-server, check Git/Helm reachability ssh: handshake failed: knownhosts: key is unknownAdd the host key with argocd cert add-ssh authentication required / repository not foundRepo credentials missing or wrong; check repo/repocreds Secrets App stuck deleting Resource with a finalizer blocks cascade; fix it or remove resources-finalizer.argocd.argoproj.io with care
# Top 15 interview one-liners
GitOps in one line: declarative desired state, versioned in Git, pulled automatically by an agent, continuously reconciled against the live cluster.
Push vs pull: push gives CI cluster credentials and only acts on pipeline runs; pull keeps credentials inside the cluster and corrects drift continuously.
Sync vs health: sync status says whether live matches Git; health says whether it works. Synced and Degraded can happen together.
prune vs selfHeal: prune deletes what was removed from Git; selfHeal reverts changes made in the cluster. Both are off unless you turn them on.
Repo-server vs controller: the repo-server clones and renders manifests; the application controller diffs and applies. Only the controller writes to clusters.
Redis: a cache only; losing it costs a cache rebuild, not state.
Sync waves: ascending order within each phase, each wave must be healthy before the next; hooks run in PreSync, Sync, PostSync and SyncFail phases.
OutOfSync loop: something mutates a field you declare (HPA, webhook, defaulting); stop declaring it, use ignoreDifferences with RespectIgnoreDifferences=true, or server-side diff.
AppProject: the tenancy boundary that limits source repos, destinations, resource kinds, roles and sync windows; never let teams use default.
ApplicationSet: a generator (list, cluster, git, matrix, merge, SCM, PR) plus a template that stamps out Applications; use goTemplate with missingkey=error.
App-of-apps: one root Application manages other Application manifests, so a cluster bootstraps from one kubectl apply.
Helm in Argo CD: rendered with helm template and applied; no Helm release Secret, so helm list is empty and lookup does not work.
Rollback the GitOps way: git revert the commit; argocd app rollback works only with auto-sync off and leaves Git disagreeing with the cluster.
Secrets: never plain in Git; Sealed Secrets (encrypt for one cluster), External Secrets (reference a secret manager, best for rotation) or SOPS (encrypt values in place with KMS/age).
Scaling Argo CD: shard the controller by cluster with ARGOCD_CONTROLLER_REPLICAS, raise status and operation processors, scale repo-server, use webhooks plus manifest-generate-paths, and exclude noisy resources.