I am trying to fully purge my kube env, but sometimes when I run helm delete --purge
some pods don't delete (sometimes).
Is there any issues using kubectl delete pods --grace-period=0 --force
Or will using this command over and over lead to any issues on my cluster or nodes?
According to the K8S documentation here. Depending on the application it might lead to corruption or inconsistency of the data because of the duplication of the pods till the node detects and kills one of the pod.
Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately.
So, it depends, if the pods are using any shared resources or not.