minikube: Ingress not working on Mac M1 host machine
What Happened?
I have ingress addon enable in my minikube cluster. I add my host names to /etc/hosts, e.g. myapp.local. The following command just hangs instead of responding as expected
curl myapp.local
I think this might be related to this issue where minikube tunnel hangs (as it does for me as well - usually I don’t need to use tunneling with ingress addon though)
Attach the log file
Let me know which kind of logs is helpful
Operating System
macOS (Default)
Driver
Docker
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 19 (3 by maintainers)
Hi, I can confirm that running
minikube tunnelworks for me on m1 with the docker driver. Keep in mind that youretc/hostsfile needs to map to 127.0.0.1, instead of the output ofminikube iporkubectl get ingress- this is an important gotcha.Dropping by to let you know what worked for us:
minikube addons enable ingressminikube tunnelwas needed. Do this in another terminal since it needs to be up. You should see logs indicating that the tunnel is working for your exposed serviceLoadBalancerservices. Using eitherNodePortor the default service type, would not do the trick. I think for most use cases when runnning locally, the service type should not really matter.127.0.0.1instead of the output ofminikube ipWith these, we were able to access our cluster from outside using
Ingress!The steps outlined here by several people do indeed work. However there is an important limitation moving away from hyperkit and toward the docker driver. hyperkit essentially allowed multiple ingress controllers to be running within minikube and exposed as distinct IP addresses by minikube tunnel. However, on docker this is not possible since it runs on localhost address space.
I’d like to see support for hyperkit or another driver that allows routes into the container IP space.
Hello everyone,
I would like to reopen this issue or get any information you may have about how to solve it @klaases.
I am currently taking an intro course to Kubernetes; I am experienced developer, proficient with Docker, but new to Kubernetes.
I have a
namespace.yamland anapp.yamlfile. I am able to start my minikube cluster and deploy my pod without any trouble.I am trying to access my app through 3 different ways:
kubectl port-forward service/ingress-nginx-controller -n ingress-nginx 8080:80; this works great!minikube tunneland then retrieving IP address of the Ingress withkubectl get ingress podinfo; this does not work.minikube ip; this does not work either, and returns the same ip address as the one exposed in the previous step.To summarize, I am able to connect to my app deployed in the cluster by making use of port forwarding, but not by using the minikube tunnel command, which seems like a hurdle in one’s path to learning Kubernetes.
I also tried the steps described by @germanflighel, but it did not solve my issue unfortunately.
Any advice or solution 🙏 ?
Thank you very much, I will remain available if needed.
minikube tunnelis required for ingress to work on the docker/podman drivers, and that’s currently the only driver supported on M1 (VM drivers are in the works). Right now,minikube tunnelwill hang when run in another terminal, but that does not mean it’s not working, we just don’t output anything.