Kubernetes namespace and resources within created by Helm won't delete

12/4/2019

I'm trying to delete a namespace and all the resources within it as well as the helm charts.

I have created a Kubernetes namespace manually and within this namespace I have deployed a Helm chart through the following commands using Tillerless Helm v2:

$ kubectl create namespace my-namespace

$ helm tiller run my-namespace -- helm upgrade --install my-release --namespace=my-namespace ./helm-chart

I have then tried to delete the namespace through a simple kubectl delete namespace my-namespace. The namespace then seems to be recreated with all the resources within it being recreated too.

Before Delete:

kubectl get namespaces
NAME          STATUS    AGE
my-namespace  Active    45m

After Delete:

kubectl get namespaces
NAME          STATUS    AGE
my-namespace  Active    5s

I've also tried to remove the helm charts individually with the command helm tiller run my-namespace -- helm delete my-release --purge but it keeps coming back. Have also tried to delete resources under the namespace using kubectl -n my-namespace delete daemonsets,replicasets,secrets,services,deployments,pods,rc,serviceAccounts,statefulsets --all but same result of resources being recreated.

-- James Marino
amazon-eks
amazon-web-services
kubernetes
kubernetes-helm
namespaces

0 Answers