minikube: `minikube ip` returns 127.0.0.1
Steps to reproduce the issue:
minikube startminikibe ip
Full output of failed command:
I0331 16:29:52.931261 527127 mustload.go:51] Loading cluster: minikube
I0331 16:29:52.969418 527127 host.go:65] Checking if "minikube" exists ...
127.0.0.1
Full output of minikube start command used, if not already included:
😄 minikube v1.9.0 on Arch rolling
✨ Using the docker driver based on existing profile
🚜 Pulling base image ...
🔄 Retarting existing docker container for "minikube" ...
🐳 Preparing Kubernetes v1.18.0 on Docker 19.03.2 ...
▪ kubeadm.pod-network-cidr=10.244.0.0/16
🌟 Enabling addons: default-storageclass, storage-provisioner
🏄 Done! kubectl is now configured to use "minikube"
I had a minikube instance before I upgraded to 1.9.0 and the bug started to appear. Creating a new cluster from scratch didn’t solve the issue. minikube service foo --url work as expected. Same for the internal ip from kubectl get node -o wide.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 15
- Comments: 45 (2 by maintainers)
Specify a new vm driver instead of none, that would be work. On mac:
macOS: minikube is still giving me external ip as
127.0.0.1(when using minikube tunnel)is any to fix it? I did read all the comments here
works fine on ubuntu
minikube start --driver=virtualboxminikube ipIf you just install minikube on your mac and start minikube you will get IP 127.0.0.1.
The fact that https://minikube.sigs.k8s.io/docs/handbook/accessing/#loadbalancer-access does not have a reference regarding the fact that using
--vm-driver=hyperkitis necessary on macOS to have the setup working is unfortunate.This is what I did on macOS:
This didn’t work and this is following the documentation. Doing it again using
--vm-driver=hyperkit(which is not referenced in that documentation page) fixed the issue.Another fix on top of the documentation one would be to check the
vm-driverwhen runningminikube tunnelon macOS as these outputs don’t tell “this is not working” to a new user:Came across this several weeks ago when I was running into
minikube ip = 127.0.0.1. Never sorted it out, thought I’d give it a shot. Now I’m gettingminikube ip = 172.17.0.2and running into similar issues.I must be dence because I’m not sorting this out.
docker,kubectl,minikube,skaffoldall in WSL2 (i.e., no Docker for Windows)--driver=dockerbecause that is the only thing that works in WSL2minikube ipis172.17.0.2172.17.0.2as the connection times outingresscontroller is operating normally forminikubeWhat do I need to do to get this working?
I think better to update the doc in MiniKube for macOS.
I Google the error for quite a while and it finally brings me here = =
PR opened.
@harlesbayu Yes, I tried that too with using both
dockerandhyperkitdriver. See output below of both:–driver=hyperkit
minikube service invoiceapi-service --urlResult:
http://192.168.64.3:30200The link above is not reachable as before. Same issue.
–driver=docker (default)
minikube service invoiceapi-service --urlResult: The link http://127.0.0.1:51798 is not reachable. Same issue.
OS: Windows Minikube: started with Docker Minikube Version: minikube v1.14.0
> minikube service invoiceapi-serviceWhen I run this command, it automacally open the brower with address ‘http://127.0.0.1:54366/’ but nothing opens. Browser says-- cannot reach to this page.
Any help appreciated.
@abhimjoshi , It’s same if use -
-driver=hyperkithave you triedminikube service invoiceapi-service --url?@srinathganesh1 Nope, no solution at this point. The proposed work around is
kubectl port-forwardorskaffold --port-forwardif you are using that, but it really isn’t a good workaround in development as it will bypass routing issues that will come up in staging and production. At this point, WSL2+kubectl+minikube+docker-driver+nginx-ingress is a no go for local dev is a no go, so I’m still on Ubuntu until it is.You can also try the nested virtualization route in WSL2, so you can use KVM, but I personally haven’t had luck with it. The Fast Ring has had nested virtualization enabled in the kernel for a while now. Or you can recompile the WSL2 Linux kernel with it enabled. Again, was never able to get it to work properly, maybe you’ll have better luck.
I think we need some integrated ingress similar to
docker-proxyorkubectl port-forward.So that there is some way to deploy an application, and make it available to the world… ? Using
NodePortis also something of a hack, when compared to a realLoadBalancerBut it’s definitely a limitation with the current Docker-in-Docker(Desktop) design, that’s for sure.
I think the Docker driver makes much more sense on Linux, where it can access network… So there you can use the
docker0bridge, and it’s almost like a real (err, virtual) k8s node.Really need to document this, like #4938. Something to include in Documentation Week
This is a design decision (for the
dockerdriver), and not really a bug per se.@medyagh : can you comment why it uses a tunnel rather than the bridge ?
i.e. 127.0.01 instead of e.g. 172.17.0.2
https://docs.docker.com/network/network-tutorial-standalone/