I’m trying to create a vSphere Kubernetes cluster in Rancher so that I can leverage the self-healing features using a preconfigured node template.
When Rancher creates the nodes, I need them to have unique hostnames and IP’s.
The problem is that the nodes are provisioned simultaneously from the template in vSphere and at first power-on, they have the same hostname and IP configuration as the template.
Assuming that the template is configured for DHCP, that (template) hostname is used when receiving an IP address from the DHCP server and every node ends up with the same hostname and the same IP from the DHCP server, which means that VM Tools reports the same IP back to the Rancher server before the SSH connection is initiated to the nodes.
I need the nodes to be configured with unique hostnames and IP’s.
How do I address this issue? Is there a way to somehow configure a new hostname and possibly a unique IP immediately after the node is powered-on the first time?