Skip to content

Unable to delete resource: namespaces "default" is forbidden: this namespace may not be deleted #9634

Answered by jannfis
juliohm1978 asked this question in Q&A
Discussion options

You must be logged in to vote

I guess to "unmanage" that resource, you would need to patch out the tracking label that Argo CD has applied to the live resource. Given a standard Argo CD configuration and that the resource was deleted in Git, you can run:

kubectl patch ns default --type=json -p='[{"op":"remove", "path":"/metadata/labels/app.kubernetes.io~1instance"}]

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by juliohm1978
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants