GitOps with Argo CD: Best Practices for 2026
Argo CD 3.x patterns for 2026: repo layout, sync policies you can trust, secrets that stay out of git, and the anti-patterns worth avoiding.
Key takeaways
- Argo CD best practices for 2026 start with a deploy repo separate from app code and Applications generated by ApplicationSets.
- Turn on automated sync and selfHeal, but scope prune to stateless workloads.
- Keep secrets out of git with External Secrets Operator, give each team an AppProject, and add Argo Rollouts for canaries.
On this page
Keep manifests in a deploy repo separate from app code, generate Applications with ApplicationSets, run automated sync with selfHeal but scope prune to stateless workloads, keep secrets out of git with External Secrets Operator, give each team an AppProject, and put Argo Rollouts in front of user-facing services. Those six cover most Argo CD incidents.
Verified against
Argo CD v3.5.6, Argo Rollouts v1.10.1, against the Argo CD operator manual (2.14 to 3.0 upgrade notes, automated sync, ApplicationSet controller) and GitHub releases. Checked October 2026.
Argo CD replaces "CI runs kubectl apply" with a controller that continuously compares the cluster to git. The practices below are about keeping that comparison honest as you grow from one cluster to many.
Repo structure: app-of-apps, then ApplicationSets
One repo with every manifest flat in a folder works for six services and falls apart at forty. The pattern that scales is a root Application pointing at a directory of other Applications ("app-of-apps"). Git owns membership, and adding a service is a pull request that adds a file. A leaf Application:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: payments-prod
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: payments
source:
repoURL: https://github.com/acme/deploy.git
targetRevision: main
path: apps/payments/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: payments
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
App-of-apps handles one cluster well. Once the same apps run across dev, staging and several regional prod clusters, hand-written Applications become copy-paste with a typo waiting. ApplicationSets fix that: one generator, many Applications. Note goTemplate: true; without it the {{.field}} syntax below is not rendered.
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: payments
namespace: argocd
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- matrix:
generators:
- clusters:
selector:
matchLabels:
env: prod
- list:
elements:
- app: payments
- app: ledger
template:
metadata:
name: '{{.app}}-{{.name}}'
spec:
project: payments
source:
repoURL: https://github.com/acme/deploy.git
targetRevision: main
path: 'apps/{{.app}}/overlays/{{index .metadata.labels "region"}}'
destination:
server: '{{.server}}'
namespace: payments
syncPolicy:
automated:
prune: true
selfHeal: true
The matrix generator crosses registered clusters against a list of apps; label a new prod cluster and the apps appear. One ApplicationSet per team is a sensible default, because ownership follows the team. missingkey=error turns a missing label into a visible error instead of an Application pointed at a wrong path. The multi-cluster version of this pattern is covered in ApplicationSets across many clusters. Since 3.0, nested selectors in matrix generators are always applied, so recheck them when upgrading from 2.x.
Sync policies, and where to slam the brakes
Automated sync with selfHeal and prune is the config people copy first and regret later. All three are off by default. Our rule: automated sync and selfHeal everywhere, prune on for stateless workloads, gated for anything with a PersistentVolumeClaim or a CRD other controllers depend on. prune deletes objects that left git. Refactor a directory so a StatefulSet's name changes, and prune deletes the old one, PVC and all.
For the changes that scare you, a database migration or a CRD version bump, use sync waves and hooks rather than manual sync. Annotate resources with argocd.argoproj.io/sync-wave so the migration Job completes before the Deployment rolls; a failing PreSync hook halts the sync with a clear status instead of a half-applied cluster. Manual sync as a safety gate mostly means someone forgets to click while drift piles up. To pause one app during an incident without deleting its policy, set spec.syncPolicy.automated.enabled: false.
Before trusting automation on a new app, look at what it would do:
argocd app diff payments-prod
argocd app sync payments-prod --dry-run
argocd app sync payments-prod --prune
argocd app wait payments-prod --health --timeout 300
Config and secrets
Kustomize overlays are our default for config: a base/ plus per-environment overlays/ carrying only what differs, with Helm for third-party charts. The fuller argument is in Kustomize overlays that scale.
Plaintext secrets never go in git. External Secrets Operator is our default when Vault, AWS Secrets Manager or GCP Secret Manager is the source of truth: git holds an ExternalSecret that references a key, and the operator materializes the Secret, so rotation happens in one place. Sealed Secrets fits when there is no external manager; the controller decrypts in-cluster, and rotation is more manual.
Progressive delivery, drift and RBAC
Argo CD syncs manifests; it does not make a rollout gradual. Argo Rollouts (v1.10.1 as of October 2026) replaces the Deployment with a Rollout that supports canary and blue-green and queries a metrics provider to promote or abort. A sane default is a 10 percent canary, an AnalysisTemplate checking error rate and p99 latency, and automatic abort. The Argo Rollouts progressive delivery walkthrough has the templates. For stateful services, where blue-green means a database cutover, see this Postgres cutover story.
Drift. Every app is Synced, OutOfSync or Unknown. With selfHeal on, Argo CD re-syncs drift after a 5-second self-heal timeout; reconciliation itself runs every 120 seconds plus up to 60 seconds of jitter by default. Since 3.0, tracking uses an annotation instead of the app.kubernetes.io/instance label, which stops false drift from tools that set that label too.
RBAC. Give each team an AppProject that scopes source repos, destination clusters and namespaces, and allowed resource kinds, with cluster-scoped resources denied by default. In 3.x, update and delete on an Application no longer apply to its managed resources, and logs RBAC is enforced by default, so audit policies on upgrade. Test a policy before shipping it:
argocd admin settings rbac can role:payments-dev sync applications 'payments/*' \
--policy-file policy.csv
Observability. Argo CD 3.0 removed argocd_app_sync_status and argocd_app_health_status; alert on the sync_status and health_status labels of argocd_app_info instead. A stuck app looks fine in a list, so it needs an alert.
Errors you will hit, and the fixes
application destination ... do not match any of the allowed destinations in project: the AppProject's destinations doesn't include that server and namespace. Add it to the project, not a wildcard.
resource :Namespace is not permitted in project (or any cluster-scoped kind): CreateNamespace=true or a CRD needs an explicit clusterResourceWhitelist entry on the project.
ComparisonError with authentication required or repository not found: repo credentials are missing or expired. Check with argocd repo list and re-add the credential template.
App permanently OutOfSync with no real change: a controller or webhook mutates a field after apply (replica counts under an HPA, injected sidecars, defaulted fields). Use ignoreDifferences or ServerSideApply=true; the full diagnosis is in fixing an Argo CD app stuck OutOfSync.
permission denied: applications, sync: the user's SSO group isn't mapped to a role with sync on that project. Fix the policy, then verify with argocd admin settings rbac can.
Where this breaks
Pull-based GitOps assumes the cluster's desired state can live in git. It fits poorly when state is generated at runtime (operators that create resources from user input), when a release needs imperative steps outside Kubernetes (DNS cutovers, data backfills), or when one team must own git while another owns emergency changes. ApplicationSets are overhead at a handful of services on one cluster, and auto-prune on stateful workloads is a standing risk however careful the repo is.
Questions people ask
What are the most important Argo CD best practices?
Separate the deploy repo from app code, generate Applications with ApplicationSets once you span environments, enable automated sync with selfHeal, scope prune away from stateful resources, keep secrets out of git with External Secrets Operator or Sealed Secrets, and isolate teams with AppProjects that deny cluster-scoped resources by default. Add Argo Rollouts for user-facing services.
Should I enable prune and selfHeal in production?
Enable selfHeal everywhere; it reverts manual kubectl edit changes within seconds. Enable prune for stateless workloads only. Both are off by default. For anything with a PersistentVolumeClaim, gate pruning, because renaming a StatefulSet in git makes Argo CD delete the old one and its storage along with it.
What changed in Argo CD 3.0 that affects these practices?
Annotation-based resource tracking became the default, update and delete RBAC stopped applying to managed resources, logs RBAC is enforced by default, argocd_app_sync_status and argocd_app_health_status were removed in favor of argocd_app_info labels, and ApplicationSet nested selectors are always applied. Read the 2.14 to 3.0 upgrade notes before moving off 2.x.
The call we'd make
Start with app-of-apps on one cluster, automated sync with self-heal from day one, and prune scoped to stateless workloads. Move to ApplicationSets the moment you are copy-pasting Applications across environments, not before. Put secrets in External Secrets Operator, keep the deploy repo separate from app code, and give every team an AppProject with cluster-scoped resources denied. Add Argo Rollouts before you think you need it. If it is running in the cluster and it isn't in git, treat that as the bug.
Sources
Cite this article
Kiril Urbonas (2025). GitOps with Argo CD: Best Practices for 2026. DevOpsNess. Updated 2026-11-15. https://www.devopsness.com/blog/gitops-with-argo-cd-best-practices-for-2025
[GitOps with Argo CD: Best Practices for 2026](https://www.devopsness.com/blog/gitops-with-argo-cd-best-practices-for-2025) (Kiril Urbonas, DevOpsNess, updated 2026-11-15)
More from DevOps
Explore more articles in this category
kubectl Cheat Sheet 2026: 60 Commands Grouped by Task
The kubectl commands we actually type, grouped by the job in front of you, from switching contexts to rolling back a bad deploy. Copy-paste blocks, real output fields, and the errors that mean you are pointed at the wrong cluster.
Fix Docker "Port Is Already Allocated"
You run docker run, and it refuses to bind port 8080. Something already owns that port. Here is how to find the holder and get your container up.
GitLab CI vs Jenkins: Which for Enterprise
One bundles your whole toolchain, the other lets you build anything from parts. The right pick depends on how much glue you want to own.
You might have missed
Evergreen posts worth revisiting.