I am running minikube on my Mac laptop. I am using VirtualBox to host the minikube virtual machine, following the official instructions.
I would like a pod that I am going to deploy into the cluster to be able to ping a server I will be running on my laptop. Assuming (for now) that I am not defining a Kubernetes Service of type ExternalName to represent that server, what IP or hostname should I use from within the program running in my pod?
EDIT: From my pod I can ping 10.0.2.2
and get answers back. However, trying to telnet
to 10.0.2.2
on port 9092
, where I happen to have an H2 database running, just hangs.
Finally, minikube ssh
, which apparently logs me into the VirtualBox VM, maybe? running as docker
? results in all the same behaviors above, in case this matters, which suggests this is fundamentally a question, I suppose, about VirtualBox.
EDIT #2: A restart of VirtualBox solved the connection issue (!). Nevertheless, 10.0.2.2
still seems like magic to me; I'd like to know where that IP comes from.