Sync Policy: Every Field, Every Sync Option, Every Annotation
57%
Creating the Destination Namespace Automatically
The CreateNamespace option tells Argo CD to create the destination namespace if it does not already exist.
By default, if the namespace in spec.destination.namespace is missing, the sync fails: Argo CD will not create it for you. Set CreateNamespace=true and Argo CD creates that namespace as part of the sync, before applying the rest of the resources.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: todo-app
namespace: argocd
spec:
destination:
namespace: todo-app # <- namespace does not exist
server: https://kubernetes.default.svc
projectGitOps the Hard Way, with Argo CD
Build Real GitOps Pipelines From Empty Clusters to Automated DeploysEnroll now to unlock all content and receive all future updates for free.
