Is that possible install rancher HA without any public domain (–set hostname)

Install Rancher 2.x HA cluster flow the offical document. But I can’t install it without public DNS – hostname. Is there any way to avoid this? I try to use /etc/hosts file but it seems like there an issue with agent docker doesn’t get config from custom DNS.
I want to access the load-balancing cluster via IP, not via public DNS.

Source: StackOverflow