5

so I just got started digging into minikube after having problems with the docker-desktop here and there. I am following https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/, but I'm running into a problem.

I did exactly what the tutorial explains:

  1. Enable the ingress addon in minikube (Does this work with self-deployed ingress controller installed via helm as well, by the way?)
  2. Deployed an application
  3. Created the corresponding Ingress configuration

I verified all is available, and end up with the following output of kubectl get ingress:

NAME              CLASS    HOSTS              ADDRESS        PORTS   AGE
example-ingress   <none>   hello-world.info   192.168.49.2   80      87m

However, when trying to access hello-world.info (either that, setup in my hosts file, or 192.168.49.2 directly, just for connectivity testing), I'm getting absolutely nothing besides request timeouts. The logs of my ingress-controller also don't mention any failed connection attempts.

The connection works just fine when manually starting a tunnel via minikube service ingress-nginx-controller-admission --namespace=kube-system.

Here's the output of minikube profile list:

|----------|-----------|---------|--------------|------|---------|---------|-------|
| Profile  | VM Driver | Runtime |      IP      | Port | Version | Status  | Nodes |
|----------|-----------|---------|--------------|------|---------|---------|-------|
| minikube | docker    | docker  | 192.168.49.2 | 8443 | v1.20.2 | Running |     1 |
|----------|-----------|---------|--------------|------|---------|---------|-------|

I'm running this example on a Windows machine via the docker-desktop runtime.

Where am I going wrong? My ultimate goal is to enable a docker-desktop like experience via my ingress. I don't want to have to manually enable / disable tunnels to access my cluster.

nugetminer23
  • 53
  • 1
  • 4
  • 1
    I am also having the same issue. And i do not understand what to do after running minikube tunnel How do you access the dummy domain. Do i map 127.0.0.1 hello-world.info in the windows hosts file? – Rakesh Feb 18 '21 at 12:02

3 Answers3

2

(Does this work with self-deployed ingress controller installed via helm as well, by the way?)

  • minikube addons enable ingress enables the minikube implementation of the Nginx Ingress

My ultimate goal is to enable a docker-desktop like experience via my ingress. I don't want to have to manually enable / disable tunnels to access my cluster.

  • Unfortunately, it is working as expected. After enabling ingress addon it is specifically stated that: After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1". So in this scenario when using Minikube on Windows you are actually supposed to use minikube tunnel. Bear in mind that Minikube is mainly used for testing and learning purposes so some of it's features might not be ideal.
  • Thanks - So there's no way to setup access to Minikube without manually forwarding something? – nugetminer23 Feb 04 '21 at 16:41
  • No, if you want to use/test `minikube addons enable ingress` with Windows you have to use `minikube tunnel`. – Wytrzymały Wiktor Feb 05 '21 at 10:13
  • @nugetminer23 Does this [answer your question](https://stackoverflow.com/help/someone-answers)? – Wytrzymały Wiktor Feb 08 '21 at 09:02
  • @WytrzymałyWiktor. I am also having the same issue. And i do not understand what to do after running `minikube tunnel` How do you access the dummy domain. Do i map `127.0.0.1 hello-world.info` in the windows hosts file? – Rakesh Feb 18 '21 at 12:01
  • @Rakesh Please explain your exact use case in a separate question to avoid unnecessary mistakes and for better clarity. – Wytrzymały Wiktor Feb 18 '21 at 12:09
  • @WytrzymałyWiktor..I did not a new one because I am having exactly(And Que will be closed as duplicate) the same issue as the OP. I have the same output OP has posted for `kubectl get ingress` And I am also trying to access `hello-world.info` via browser or curl – Rakesh Feb 18 '21 at 12:16
  • Que in Stackoverflow : https://stackoverflow.com/questions/66206451/kubernetes-ingress-flask-application – Rakesh Feb 18 '21 at 12:20
2

I couldn't get Ingress working on minikube (Windows 10, Docker Desktop) after two weeks of trying. minikube tunnel gives me access to 127.0.0.1/80 but I could never reach out to the ingress routes. Have you tried kind? Even though setting up Ingress is quite involved in kind but it works. I have written an article Getting started with Kind.

Pankaj
  • 121
  • 1
0

My case I missed to enable ingress. Below command can use to enable ingress

minikube addons enable ingress

Before enable ingress addons

kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
app app.com 80 23m

After enabled ingress addons

kubectl get ingress
NAME CLASS HOSTS ADDRESS PORTS AGE
app app.com 172.20.114.70 80 23m