Exposing ingress to host windows machine when running minikube in vagrant virtualbox (ubuntu VM) with docker driver

8/29/2020

I am running a vagrant box using virtual box (running headless ubuntu 18.04) on windows 10 host machine. Inside the virtual box, I have minikube set up using docker as the vm-driver

minikube start --memory=6144 --cpus=2 --disk-size=40g --vm-driver=docker --bootstrapper kubeadm --kubernetes-version=1.17.4

My application is exposed via an ingress to the ubuntu machine running inside virtual box and I am able to access the application via wget/cURL enter image description here

On running minikube IP it gave me the IP of the docker container in which minikube runs enter image description here

Some additional configuration info - enter image description here enter image description here

Vagrant file -

enter image description here

I would like to access the application from my windows machine's browser , any idea how to achieve that ? vagrant port forwarding doesn't seem to help.

-- Surendra Singh Khatana
forgerock
kubernetes
minikube
vagrant
virtualbox

1 Answer

8/29/2020

If you really want to use a setup like this(using vagrant etc.). You can just use --vm-driver=none and let the kubernetes run in your ubuntu box directly, this way you can leverage port-forwarding. You probably also can do it your way but I've never tried so I wouldn't know, but I know that none works. You can follow this guide.

There are different options like running minikube on windows directly. Which is perfectly fine as well.

-- Akin Ozer
Source: StackOverflow