<p>I have Kubernetes cluster with two nodes. One's role is Master.</p>

<p>I want to move master node to another physical server. </p>

<p>The possible way I see is to add another node and change its role to master. </p>

<p>How can I do that?  Is there any kind of instructions?
Is this the only way?</p>

Alexey Anisimov
<p>Might be a duplicate of <a href="https://stackoverflow.com/questions/34239979/migration-of-kubernetes-master">Migration of Kubernetes Master</a></p>

<p>In fact, you just need to </p>

<ul>
<li>clone data from the disk</li>
<li>change identity of the new server (IP address/DNS name)</li>
</ul>

<p><strong>Update</strong></p>

<p>If you want to change master IP address in kubeadm config, check following references: </p>

<ul>
<li>replacing the IP address in all config files in /etc/kubernetes</li>
<li>backing up /etc/kubernetes/pki</li>
<li>identifying certs in /etc/kubernetes/pki that have the old IP address as an alt name</li>
<li>deleting both the cert and key for each of them (for me it was just apiserver and etcd/peer)</li>
<li>regenerating the certs using kubeadm alpha phase certs<a href="https://github.com/kubernetes/kubeadm/issues/338#issuecomment-418879755" rel="nofollow noreferrer">2</a></li>
<li>identifying configmap in the kube-system namespace that referenced the old IP</li>
<li>manually editing those configmaps
restarting kubelet and docker (to force all containers to be recreated)</li>
</ul>

<p>Or take a look at this step-by-step <a href="https://github.com/kubernetes/kubeadm/issues/338#issuecomment-418879755" rel="nofollow noreferrer">instruction</a> </p>
