<p>Kubernetes version 1.12.3. Does kubectl drain remove pod first or create pod first.</p>

PengYang
<p>You can use kubectl drain to safely evict all of your pods from a node before you perform maintenance on the node (e.g. kernel upgrade, hardware maintenance, etc.)</p>

<p>When kubectl drain return successfuly it means it has removed all the pods successfully from that node and it is safe to bring that node down(physically shut off, or start maintainence)</p>

<p>Now if you turn on the machine and want to schedule pods again on that node you need to run:</p>

<pre><code>kubectl uncordon &lt;node name&gt;
</code></pre>

<p>So, <code>kubectl drain</code> removes pods from the node and don't schedule any pods on that until you uncordon that node</p>
