<p>Does anyone know the correct procedure to bring down a kubernetes cluster gracefully?
I have K8s 1.12 running on bare metal (built with kubeadm on Ubuntu 16.04) in a lab. I want to bring down the cluster gracefully before I shut down the servers. Strangely this is not documented - so maybe that is handled when the system services are stopped; but I want to check.
Thanks</p>

<p>The tear down section of the <a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#tear-down" rel="nofollow noreferrer">official documentation</a> says:</p>

<p>To undo what kubeadm did, you should first drain the node and make sure that the node is empty before shutting it down.</p>

<p>Talking to the master with the appropriate credentials, run:</p>

<pre><code>kubectl drain &lt;node name&gt; --delete-local-data --force --ignore-daemonsets 
kubectl delete node &lt;node name&gt;
</code></pre>

<p>Then, on the node being removed, reset all kubeadm installed state:</p>

<pre><code>kubeadm reset
</code></pre>
