title: How to make kubernetes work with dynamic ip address
body: <p>I have created a kubernetes cluster where I have a master node and two worker nodes. I initialised master node using below command </p>
  
  <pre><code>sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.0.27
  </code></pre>
  
  <p><code>192.168.0.27</code> is the ip address of master node. Then I used the generated token to start my worker nodes. Now the problem is that my network is in DHCP and the ip address changes sometime due to which it starts showing below error:</p>
  
  <pre><code>Unable to connect to the server: dial tcp 192.168.0.27:6443: getsockopt: no route to host
  </code></pre>
  
  <p>It shows above error because at the time of initializing the master node, I have  used the ip address and after the ip address changes, its not able to access it.</p>
  
  <p>Is it possible to configure master and other nodes in some way so that they can work regardless of any ip address change.</p>
  
  <p>Thanks</p>