To mark a node as unschedulable:
kubectl cordon <node-name>
kubectl uncordon <node-name> To get the node back
kubectl uncordon <node-name>
To mark a node as unschedulable and remove all running pods from it
kubectl drain <node-name>
Pods that have started from a DaemonSet will not be removed while using kubctl drian , add --ignore-daemonsets to ignore that
kubctl drian
--ignore-daemonsets
Add --delete-empty-dir to delete fata from emptyDir Pod volumes
--delete-empty-dir