Skip to content
Latchkey

Argo CD "SyncError: one or more objects failed to apply" in CI

Argo CD applied your manifests to the cluster and at least one object was rejected. The SyncError condition names each object and the API server error, which is the actual reason the apply failed.

What this error means

argocd app sync exits non-zero with "SyncError: one or more objects failed to apply" and a per-resource message such as a validation error, a webhook denial, or "the server could not find the requested resource".

argocd
FATA[0011] rpc error: code = FailedPrecondition desc = one or more objects failed to apply,
reason: Deployment.apps "api" is invalid: spec.template.spec.containers[0].image:
Required value

Common causes

A resource is invalid or violates a policy

The API server or an admission webhook rejected the object. The reason string names the field or policy that failed.

A dependency was applied out of order

A resource references a namespace, CRD, or secret that did not exist yet, so the apply of the dependent object failed.

How to fix it

Read each per-object reason

  1. Run argocd app sync <app> and read every "reason:" line, not just the summary.
  2. Fix the named field, policy violation, or missing dependency.
  3. Re-sync and confirm all resources report Synced.
Terminal
argocd app sync my-app
argocd app get my-app --output wide

Order dependencies with sync waves

Annotate prerequisites (namespaces, CRDs) with a lower wave so they apply before the resources that need them.

namespace.yaml
metadata:
  annotations:
    argocd.argoproj.io/sync-wave: "-1"

How to prevent it

  • Validate manifests (kubeconform / kubectl apply --dry-run=server) before sync.
  • Use sync waves so namespaces and CRDs apply before dependents.
  • Read every per-object reason, since one summary can hide several failures.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →