Skip to content

Specifying the namespace for the App when using ArgoCD Autopilot

Published: at 01:30 PM (1 min read)

How to specify the namespace that the application will be deployed to when adding an app to ArgoCD using the Autopilot CLI

Table of contents

Open Table of contents

The ArgoCD Autopilot CLI

This is a tool developed by the Argo team to give an opinionated way to structure your repo. It comes with a CLI to help bootstrap the repo and then for adding apps.

How to specify the namespace for the app

If you are using their Getting Started Guide there is an example to add a app, but this will be put in the default namespace.

argocd-autopilot app create hello-world --app github.com/argoproj-labs/argocd-autopilot/examples/demo-app/ -p testing --wait-timeout 2m

I thought that using the -n or --namespace flag would allow me to specify for the app to be put in a new namespace but that didn’t work.

I needed to use the --dest-namespace flag to get it to work.

The full command was

argocd-autopilot app create hello-world --app github.com/argoproj-labs/argocd-autopilot/examples/demo-app/ -p main --wait-timeout 2m --type kustomize --dest-namespace hw