Setup elastic cluster of vms with dynamic ips

I need to setup cluster of 60 nodes with dynamic ips. How to provide master node ips in unicastfile when we can’t use static ip in this case. How does nodes find each other with dynamic ips?