-
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
ingress addon is not properly assigning ip for ingresses on windows #2922
Comments
i face the same issue on Mac |
I'm facing the same issue on Linux Pop!_OS, can you post commands and output of the curl to the minikube ip? I'm hitting the default backend when curling the minikube IP, as expected. However, when I add the path to my ingress, I'm still resulting in 404 not found error. |
The issue for me was stemming from leaving host as a default value. Was able to get around the problem by specifying different host name like in this tutorial https://medium.com/@Oskarr3/setting-up-ingress-on-minikube-6ae825e98f82 |
I am facing the same issue on Mac (minikube v0.28.0). Specifing the host which I did from the beginning did not help. Always get ip address 10.0.2.15 assigned instead of the minikube ip |
@tkautenburger Did you add the minikube IP and hostname to /etc/hosts? After that I curl http://hostname/ and it worked. Make sure to specify whatever path after the ‘/‘ you specified for the service in the ingress yaml file. If no path was specified then just http://hostname/ should work |
Yes I did that in /etc/hosts. I suppose the minikube IP should also show up when I do a
kubectl get services
after creating the ingress object but it always resolves the hostname to 10.0.2.15 and it takes about a minute after the creation until the IP shows up at the ingress.
Von meinem iPhone gesendet
… Am 13.07.2018 um 00:46 schrieb jrivera97 ***@***.***>:
Did you add the minikube IP to /etc/hosts? Should be added as . After that I curl http://hostname/ and it worked. Make sure to specify whatever path after the ‘/‘ you specified for the service in the ingress yaml file
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Can you post your ingress yaml file, and the output of kubectl describe for the service and the ingress? |
I'm having the exact same problem running on Ubuntu 16.04.
Minikube:
Host:
|
Sorry for not answering so long, but I had a nice vacation in the south of France. Anyway, the good news is, i got it working, the bad news is, I don't know why. In the meantime i did the following steps:
Here is my ingress YAML script (the example is from a manning book "Kubernetes in Action"):
Here is the referenced backend nodeport service that has via the application selector three pods attached to it:
Here is my host entry in the /etc/hosts file:
And now comes the strange thing. When I list the ingress controller with
But when I curl the ingress controller by its hostname it round robin nicely thru the container apps in my three pods:
As I sad at the beginning, I have no idea what happened, it did not work before, maybe the update or the reboot did it. |
@tkautenburger using the minikube IP works (that's what you're doing with the /etc/hosts file). |
OK, but why is it then when I do a |
Because of this: |
I got it. It's the network configuration of the minikube's virtual box. When I do a
The ingress controller takes the IP address of the eth0 interface and that's why it always resolves the external IP to 10.0.2.15. Haven't managed to change the network settings of the virtual machine yet. Every time a do a change, like switching the interfaces or disable the NAT network on eth0 the minikube won't come up again. |
HI everyone : )
I think if I use thanks |
Hi holy, the reason is, that when you installed your minikube, the VM on the VirtualBox by default gives it two interfaces, eth0 with the IP of 10.0.2.15 (that is for the NATing the vm to the internet) and eth1 with the actual IP that the minikube VM has on the internal net, e.g. 192.168.1.1 (that is the host-only network). When you create the ingress, it always takes as the external IP the IP address of eth0 interface, which is 10.0.2.15. See also my earlier comment on this, with the output of the `ifconfig``command executed in the shell of the minikube image. But when you give your Ingress definition a DNS name for your host, e.g. like this:
and put the DNS name that you chose in your /etc/hosts file like this:
you should be able to reach your kubernetes-demo-service via the ingress controller by curling
from your localhost. Don't wonder, that you can get it via the IP-address, only the host name works, because the ingress still has the wrong IP (10.0.2.15) in its configuration, but does not seem to care much about it. |
Hi @tkautenburger Thank you so much. now I can request First I am not change My thought is right? Thanks again : ) |
Hi saga, yes that is right. With With your ingress definition you could for example try to And from the moment on you use host and path definitions in your ingress resource, only the host name and path in your ingress will work when curling the service and not the minikube vm's IP address anymore, all other requests will only hit the default backend of the ingress controller. You can try that when you use my ingress definition and swap back and forth between yours and mine. |
@tkautenburger Thanks again : ) Yeah I want a summary about this, so if I want use
Above step is right ? Now I will try use |
+1. anyone solved the issue without -host - /etc/hosts trick ? |
Instead of editing your /hosts/etc, you can also make use of the free DNS-service nip.io.
This makes life already a bit easier. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I am using ExternalDNS and I wanted my ingress addresses to reflect the ip address of my VM (as seen by my host). I got this to work as desired by..
It's not obvious to me how this could be implemented dynamically in |
I also facing same problem , minikube eth0 IP is 10.0.2.15 , and kubectl get ingress , command reports ingress resources IP as 10.0.2.15 , not the minikube VM IP , which is 192.168.99.100 , is there a way in minikube , so that minikube eth0 IP be 192.168.99.100 , and eth1 IP be 10.0.2.15 @andahme using your approach to fix the problem does not work, because as soon , we disable ingress on minikube , ingress controller and deployments gets removed. so what you mean by disabling addon-manager, can you give command for that. |
@andahme I think I got ,how to disable addon manager , as that is also a addon for minikube |
Bumping for visibility, this is happening to me on Mac OS |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/close |
@tkautenburger: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@andahme Not sure if that's the static IP you are talking about but Docker Desktop on windows does this in hosts file:
|
NAME CLASS HOSTS ADDRESS PORTS AGE
|
Issue persists on Windows 10 Pro build 19041.450 with WSL2 and minikube v1.23.0. Addresses are not assigned to ingresses but work when deployed to live kubernetes cluster on Digital Ocean. |
Minikube version (use
minikube version
): v0.28.0cat ~/.minikube/machines/minikube/config.json | grep DriverName
): virtualboxcat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
): iso/minikube-v0.28.0.isoWhat happened: After running minikube addons enable ingress, and then kubectl creating an ingress, if you run kubectl get ing the assigned address is 10.0.2.15 and when i add this ip into my /etc/hosts file with the corresponding host, it does not hit my nginx controller running on my minikube
What you expected to happen:
The Ingress resource should be assigned the address of the minikube ip address. When I sub in the minikube ip address into the host file instead of the ip that shows up when i run kubectl get ing, then everything works correctly and i can hit the nginx controller on my minikube. When I run these exact same commands on my mac it automatically assigns the ip of the minikube as the address, so i think this is a windows specific issue.
How to reproduce it (as minimally and precisely as possible):
on a windows os, run minikube addons enable ingress, and then create and ingress resource and look at the address it gives you.
The text was updated successfully, but these errors were encountered: