I have a simple Node.js server running on some Kubernetes pods. When I delete a deployment with:
kubectl delete deployment <deployment-name>
sometimes pods have a status of terminating for 5-8 seconds. Seems excessive - is there a way to kill them faster somehow?
If you really want to kill them instead of gracefully shutdown, then:
kubectl delete deployment <deployment-name> --grace-period=0
Also, if you have any preStop
handlers configured, you could investigate if they are causing any unnecessary delay.