-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minikube ip
returns 127.0.0.1
#7344
Comments
Same here in Ubuntu 18.04. Works fine with 1.8.2. |
This is a design decision (for the @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/ |
Ok. Is there another way to reach the cluster from the host then? |
I think you would have to use By default it will only tunnel 2376 (docker) and 8443 (kubernetes), in addition to the regular 22 (ssh):
When using something like VirtualBox, it will do two different networks - one for ssh, one for "other" So there you would contact the external interface for services (NodePort etc) |
docker driver (ubuntu OS)
docker@minikube:~$ ip a show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:0b:70:dd:aa brd ff:ff:ff:ff:ff:ff
inet 172.18.0.1/16 brd 172.18.255.255 scope global docker0
valid_lft forever preferred_lft forever
42: eth0@if43: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
valid_lft forever preferred_lft forever virtualbox driver (minikube OS)
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$ ip a show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2a:ac:d8 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
valid_lft 85947sec preferred_lft 85947sec
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:35:06:cf brd ff:ff:ff:ff:ff:ff
inet 192.168.99.100/24 brd 192.168.99.255 scope global dynamic eth1
valid_lft 747sec preferred_lft 747sec
4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:86:b5:6f:57 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
7: veth9ecd582@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
link/ether a6:7a:09:db:b2:88 brd ff:ff:ff:ff:ff:ff link-netnsid 0
9: veth39af8e8@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
link/ether be:b8:87:fb:ab:1f brd ff:ff:ff:ff:ff:ff link-netnsid 1 |
Interesting, thanks for the pointer. So in short, to access service from the host you should create As a workaround for people using
|
Really need to document this, like #4938. Something to include in Documentation Week |
I know this has been closed, but what is the rationale behind this decision?
Why would `minikube ip` here give you something other than the cluster's IP?
…On Wed 1 Apr 2020, 17:56 Anders Björklund, ***@***.***> wrote:
Really need to document this, like #4938
<#4938>. Something to
include in Documentation Week
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLX5OULPCLZRVAD4T2MJS3RKNP35ANCNFSM4LX7Z5LQ>
.
|
As far as I know, it is because the docker network does not work on darwin or windows. https://docs.docker.com/docker-for-mac/networking/ https://docs.docker.com/docker-for-windows/networking/ It works on Linux, though. EDIT: Naah, that is for accessing the VM from the container, not from the laptop. I think Docker needs to "expose" all ports that should be available ? So maybe |
Got it. I managed to make it work using a LoadBalancer and Still, neither Also, there's not that much incentive for users on Windows and Darwin to use docker instead, given it's still running a VM anyway. Or am I wrong? |
Probably, it only "works" for the tunneled ports (and that only if you can change them, we had a long-standing request on docker-machine to not hard-code 2376 - which they have refused to accept...)
No, that sounds about right. I'm using Ubuntu myself, but it would be great to get Win and Mac user feedback on how the "docker" driver is working for them! The same with Linux users, from "none". You can use the poll for this, if there is anything specific - then please open a new issue, thanks! We should also do some more organized performance/resources investigation, when there is time. |
The old |
Came across this several weeks ago when I was running into I must be dence because I'm not sorting this out.
What do I need to do to get this working? |
Same as @eox-dev . Only docker containers work. VirtualBox definitely not. |
@svanschalkwyk : as far as I know it is a Docker limitation in WSL (similar to Docker for Windows) I think they continued the discussion in #7879, the workaround is tunnel and port-forward as usual. |
@afbjorklund Yeah, I tried tunnel and wasn't able to get it to work #7879 (comment). Yeah, |
I think we need some integrated ingress similar to So that there is some way to deploy an application, and make it available to the world... ? But 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... |
macOS: minikube is still giving me external ip as
is any to fix it? I did read all the comments here works fine on ubuntu |
@srinathganesh1 Nope, no solution at this point. The proposed work around 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. |
Specify a new vm driver instead of none, that would be work. On mac: minikube start --vm-driver=hyperkit |
No luck even using it with with It displays like this after I run the command (
But, I am not able to connect my service in browser. The URL/ page is not reachable. Any help? |
If you just install minikube on your mac and start minikube you will get IP 127.0.0.1. |
Could u share your services yaml? |
@harlesbayu Thanks for the reply. I have tried with both
You are right. I am getting minikube IP 127.0.0.1 Please see below my service yaml:
Thanks again. |
@abhimjoshi , It's same if use - |
@harlesbayu Yes, I tried that too with using both --driver=hyperkit
Result: The link above is not reachable as before. Same issue. --driver=docker (default)
Result: |
@abhimjoshi Did you used Pod yaml? |
@harlesbayu Yes, see it below: (I am using
|
Try this in a new terminal and dont close the terminal
|
@srinathganesh1 It starting the tunnel, but then nothing happens. See output below:
I have also tried to access the service after tunnel was started with both the ports (9005 and 30200), but the URL/ page was not reachable |
@harlesbayu @srinathganesh1 Do you guys have any updates or further information? |
@abhimjoshi |
@harlesbayu See the output below after I ran the command:
I do not see anything related to Thanks again. |
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. |
is any one get any WA for above issue? I'am facing same issue not able to run the service on browser.. and minikube ip shows 127.0.0.1 on windows system |
The fact that https://minikube.sigs.k8s.io/docs/handbook/accessing/#loadbalancer-access does not have a reference regarding the fact that using This is what I did on macOS:
This didn't work and this is following the documentation. Doing it again using Another fix on top of the documentation one would be to check the
|
Thanks @armandgrillet for the information. I have tired all the things as mentioned by you, but it is not working and facing the same issue on macOs. The URL/ page is not reachable. Thanks again. |
using minikube version: v1.8.2 worked for me |
You can use Hyperv for windows 10,
|
OS:
When I run this command, it automacally open the brower with address 'http://127.0.0.1:54366/' but nothing opens. Any help appreciated. |
@abhimjoshi can u try to open it manually in the browser ? the openning browser might not work on your OS have u tried curl --vvv URL ? |
@medyagh Thanks for the reply. Finally, I found the issues and resolved it. It was basically the container port issue. Asp.Net Core app with docker runs on port 80 by default if you didn't specify it; and in my deployment configuration file I have used the container port 9005 which was incorrect. I have replaced this
with...
and it is working like a charm. Thanks again! |
@abhimjoshi I am having the exact same issue. However, I made sure my container port was pointing out to the right port (8080 in my case).
I am testing a Node.js app that is set to listen to port 8080. So, after running
If I curl from WSL to localhost, it succeeds. I get the response from one of the pods.
Unfortunately, It still doesn't work if I use the web browser on Windows. I can't seem to figure out why. |
after digging a bit more about this issue, it all laughably came down to: |
@b4ruch This is good finding. I hope your issue has been resolved now. |
Steps to reproduce the issue:
minikube start
minikibe ip
Full output of failed command:
Full output of
minikube start
command used, if not already included: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 fromkubectl get node -o wide
.The text was updated successfully, but these errors were encountered: