Hi Team, I have a two questions on `kubectl drain` command, 1. When I used `kub . . .

jitender chand:
Hi Team,
I have a two questions on kubectl drain command,

  1. When I used kubectl drain controlplane after that I still can see some pod are running in it.

Matthew Robinson:
The three pods that you’ve highlighted are static pods and are managed by kubelet running on the node, not by the apiserver.
https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/

Matthew Robinson:
In fact these three pods ARE the controlplane so it doesn’t really make sense for them to be drained (which is why they’ve been created as static pods).

unnivkn:
Hi @jitender chand the purpose of drain command is to drain your application pods & not the system pods you highlighted. System pods are needed for the normal operation of the k8s cluster.
eg: k drain node01 --ignore-daemonsets