<p>I have a node mistakenly registered on a cluster B while it is actually serving for cluster A.</p>
<p>Here 'registered on a cluster B' means I can see the node from <code>kubectl get node</code> from cluster B.</p>
<p>I want to deregister this node from cluster B, but keep the node intact.</p>
<p>I know regular process to delete a node is:</p>
<pre><code>kubectl drain node xxx
kubectl delete node xxx
# on node
kubeadm reset
</code></pre>
<p>But I do not want pods on the node from cluster A to be deleted or transfered. And I want to make sure the node would not self-register to cluster B afterwards.</p>
<p>To be clear, let's say, cluster A has Pod A on the node, cluster B has Pod B on the node as well, I want to delete node from cluster B, but keep Pod A intact. (By the way, can I see Pod A from cluster B?)</p>
<p>Thank you in advance!</p>

<p>To deregister the node without removing any pod you run below command</p>
<pre><code>kubectl delete node nodename
</code></pre>
<p>After this is done the node will not appear in <code>kubectl get nodes</code></p>
<p>For the node to not self register again stop the <code>kubelet</code> process on that node by logging into that node and using below command.</p>
<p><code>systemctl stop kubelet</code></p>
