machine-drivers / docker-machine-driver-xhyve

docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
https://godoc.org/github.com/machine-drivers/docker-machine-driver-xhyve
BSD 3-Clause "New" or "Revised" License
888 stars 74 forks source link

IP to connect to the host machine #196

Closed the-jackalope closed 6 years ago

the-jackalope commented 6 years ago

Hi!

I'm using xhyve as my Minikube VM driver. I'm aware that when using Virtualbox as the VM driver for Minikube, the IP address 10.0.2.2 is a shorthand for connecting back to the host, but this doesn't seem to be hold when using xhyve.

Is there an IP that exposes the host machine when using xhyve? I'd like to be able to dynamically expose applications running on my host machine's localhost to applications running on my cluster and using ifconfig to get the address each time doesn't seem super sustainable 🙂

Lookyan commented 6 years ago

Have you found any working solution?

r2d4 commented 6 years ago

It looks like you can use 192.168.64.1 for xhyve.

See https://github.com/kubernetes/minikube/blob/master/pkg/minikube/cluster/cluster.go#L287-L318 for more info.

Lookyan commented 6 years ago

@r2d4 Thank you for response. But it doesn't work for me. I want to have an access to 2049 port on Mac for NFS, may be I should forward this port using some rules?

Lookyan commented 6 years ago

Oh, sorry. It works. It was my mistake. I tried connecting to this port using telnet, but it didn't work. But with kubernetes persistent volume of type NFS it works perfectly well. Thank you!

the-jackalope commented 6 years ago

Thanks @r2d4 ! Works for me too