Kargo CLI Namespace Error When Creating a Warehouse

Understanding the namespace requirement for Kargo projects

When creating a Warehouse using the Kargo CLI, you may encounter the following error:

kargo create -f core/kargo/dupapp/warehouse.yaml
Error: create resource: not_found: namespaces "my-app" not found

Cause of the Issue

  • Kargo projects are tightly coupled with namespaces.

  • The namespace where the Warehouse is created must match the project name.

Solution

  1. Verify that the Project name matches the Namespace:
    If your project is named my-app, ensure your Warehouse definition refers to the same namespace.

  2. Create the Warehouse again:

    kargo create -f core/kargo/dupapp/warehouse.yaml

Key Takeaway

For Kargo, the Project name and the Namespace must be the same. If you’re getting a "namespace not found" error, manually create the namespace first before applying resources.