<p>I have some VMs on top of a private cloud (OpenStack). While trying to make a cluster on the master node, it initiates the cluster on its private IP by default. When I tried to initiate a cluster based on public IP of master node, using <code>--apiserver-advertise-address=publicIP</code> flag, it gives error.</p>

<blockquote>
  <p>Initiation phase stops as below:</p>
  
  <p>[wait-control-plane] Waiting for the kubelet to boot up the control
  plane as static Pods from directory "/etc/kubernetes/manifests". This
  can take up to 4m0s [kubelet-check] Initial timeout of 40s passed.</p>
</blockquote>

<p>I've noticed that I do not see the public IP of VM from inside it (running "ip addr"), but VMs are reachable via their public IPs.</p>

<p>Is there a way to setup a Kubernetes cluster on top of "public IPs" of nodes at all?</p>

Maryam Tavakkoli
<p>Private IP addresses are used for communication between instances, and public addresses are used for communication with networks outside the cloud, including the Internet. So it's recommended to setup cluster only on private adresses.</p>

<p>When you launch an instance, it is automatically assigned a private IP address that stays the same until you explicitly terminate the instance. Rebooting an instance has no effect on the private IP address.</p>

<p>A pool of floating IP addresses, configured by the cloud administrator, is available in OpenStack Compute. The project quota defines the maximum number of floating IP addresses that you can allocate to the project.</p>

<p>This error is likely caused by:</p>

<ul>
<li>The kubelet is not running</li>
<li>The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)</li>
</ul>

<p>If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:</p>

<ul>
<li>systemctl status kubelet</li>
<li>journalctl -xeu kubelet</li>
</ul>

<p>Try to add floating IPs of machines to <strong>/etc/hosts</strong> file on master node from which you want to deploy cluster and run installation again.</p>
