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
-
Verify that the Project name matches the Namespace:
If your project is namedmy-app
, ensure your Warehouse definition refers to the same namespace. -
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.