Minikube service URL not working
If you are running minikube with Docker driver, you will need to do some port-forwarding. Open a separate command line terminal and run the following command (leaving that window open):
> kubectl port-forward service/hello-minikube 54080:8080
Now in your original command line window run your service:
> minikube service hello-minikube
Now you can access http://localhost:54080 and everything should be working correctly.
You made a mistake when creating a pod or deployment using port number 80. That's why your URL service is not working, because 80 port is already busy. You need to use another port number, like 8080.
For Example:
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
$ kubectl expose pod hello-minikube --type=NodePort
$ minikube service hello-minikube --url
From what I see, you executed minikube start
inside the Ubuntu VM. By default, this would try to download the minikube ISO and launch another VM (VM inside a VM) where minikube would be running.
I think that this nested virtualization is causing issues with your installation. If, for some reason, minikube started with --vm-driver=none
to avoid the VM inside the VM (I think this is the case, looking at the 127.0.0.1 UP), there are some features that are in beta (by the time this answer was written), which could explain the weird behaviour. Because of this, my first advice would be to execute minikube inside the Windows host so it spins up a VM inside virtualbox. Inside you could reproduce the container environment you previously had, and execute the kubectl commands from the Windows host. Most of the documentation assume this setup, so you would not see differences like 127.0.0.1 in localhost.
In any case, in order to have full redirection and check if the service is running, try executing the curl command like this:
curl -L http://127.0.0.1:31209