k3s cleanup of HelmChart?
Are you sure that kubectl delete -f
is hanging?
I had the same issue as you and it seemed like kubectl delete -f
was hanging, but it was really just taking a long time.
As far as I can tell, when you issue the kubectl delete -f
a pod in the kube-system
namespace with a name of helm-delete-*
should spin up and try to delete the resources deployed via helm. You can get the full name of that container by running kubectl -n kube-system get pods
, find the one with kube-delete-<name of yaml>-<id>
. Then use the pod name to look at the logs using kubectl -n kube-system logs kube-delete-<name of yaml>-<id>
.
An example of what I did was:
kubectl delete -f jenkins.yaml # seems to hangkubectl -n kube-system get pods # look at pods in kube-system namespacekubectl -n kube-system logs helm-delete-jenkins-wkjct # look at the delete logs
I see two options here:
Use the
--now
flag to delete your yaml file with minimal delay.Use
--grace-period=0 --force
flags to force delete the resource.
There are other options but you'll need Helm CLI for them.
Please let me know if that helped.