Interview Prep/GitOps & Argo CD/The Application CRD & Sync Policies

When would you use `Replace=true` and `Force=true`?

AdvancedConceptThe Application CRD & Sync Policies
Answer

Replace=true makes Argo CD use kubectl replace (or create) instead of apply, which avoids the last-applied annotation size limit and three-way merge surprises. Adding Force=true deletes and recreates the object, needed when changing immutable fields such as a Deployment's spec.selector, a Job's template, or a Service's clusterIP. Both are dangerous on stateful or traffic-serving objects, so set them per resource with an annotation, not per app.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on The Application CRD & Sync Policies