When we take the node for maintenance, pods inside the nodes also take a hit.
However, we can avoid it by using the below command
kubectl drain <nodename>
When we run the above command it marks the node unschedulable for newer pods then the existing pods are evicted if the API Server supports eviction else it deletes the pods
Once the node is up and running and you want to add it in rotation we can run the below command
kubectl uncordon <nodename>
Note: If you prefer not to use kubectl drain (such as to avoid calling to an external command, or to get finer control over the pod eviction process), you can also programmatically cause evictions using the eviction API.
For more info refer: https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/