Delete k8s resources in a namespace, based on a prefix
1 min readOct 11, 2020
If you need to cleanup your namespace resources based on a prefix and don’t want to do it manually, then this script I wrote is for you.
Note that this assumes you use a naming convention for your resources.
This will iterate through resources, in the right order ( as tested so far… ) to delete everything starting with that prefix.