Closed
Description
Describe the problem/challenge you have
If the default namespace is included as a resource in a kapp-deployed application, you can then not delete the application. You get the following error and you are stuck:
Error: resource deletion failed: kapp: Error: Applying delete namespace/default (v1) cluster:
Deleting resource namespace/default (v1) cluster: namespaces "default" is forbidden: this namespace may not be deleted (reason: Forbidden)
. Delete failed: Error (see .status.usefulErrorMessage for details)
Error: exit status 1
Describe the solution you'd like
I don't think it is realistic to prevent the default namespace to be part of an application configuration, so maybe one of these two approaches could work:
- If default namespace is one of the resources in the YAML, ignore it but deploy the rest of the resources in the application
- If default namespace is one of the resources in the kapp-deployed application, do not try to delete the namespace during
kapp delete...
. Simply ignore it and delete the rest of the application resources.
Anything else you would like to add:
Here is one case in which I ran into this problem:
vmware-tanzu/community-edition#3067
It is not the only situation in which I've experienced this issue, but I think it's a good example.