title: What happens when you drain nodes in a Kubernetes cluster?
body: <p>I'd like to get some clarification for preparation for maintenance when you drain nodes in a Kubernetes cluster:</p>
  
  <p>Here's what I know when you run <code>kubectl drain MY_NODE</code>:</p>
  
  <ul>
  <li>Node is cordoned</li>
  <li>Pods are gracefully shut down</li>
  <li>You can opt to ignore Daemonset pods because if they are shut down, they'll just be re-spawned right away again. </li>
  </ul>
  
  <p>I'm confused as to what happens when a node is drained though.</p>
  
  <p><strong>Questions:</strong></p>
  
  <ul>
  <li>What happens to the pods? As far as I know, there's no 'live migration' of pods in Kubernetes. </li>
  <li>Will the pod be shut down and then automatically started on another node? Or does this depend on my configuration? (i.e. could a pod be shut down via drain and not start up on another node)</li>
  </ul>
  
  <p>I would appreciate some clarification on this and any best practices or advice as well. Thanks in advance.</p>