Internal and External IP Addresses

Hey guys,

I am using a custom docker machine driver for provisioning nodes. The VMs also have a private network attached to them.

However a quick kubectl get nodes -o wide still shows the public ip address of the nodes as the private one. How does rancher decide which ip is the internal one and how can I get the kubelet to use the correct internal and external addresses when provisioning through a custom node driver?

Thank you in advance!