Interview Prep/GitOps & Argo CD/Sync Operations, Hooks & Health

Sync fails with `namespaces "payments" not found`.

BeginnerTroubleshootingSync Operations, Hooks & Health
Answer

Likely causes → The destination namespace does not exist and the app does not create it.

Diagnose → kubectl get ns payments on the target cluster.

Fix → Add the sync option, plus labels if needed:

syncPolicy:
  syncOptions:
    - CreateNamespace=true
  managedNamespaceMetadata:
    labels:
      team: payments

Or create the namespace in a platform app first.

Prevent → Decide per tenancy model who owns namespaces and make it the default in the app template.

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

More on Sync Operations, Hooks & Health