<p>MacOS Big Sur 11.6.8
minikube version: v1.28.0</p>
<p>Following several tutorials on ingress and attempting to get it working locally. Everything appears to work: manual <code>minikube service foo</code> works, <code>kubectl get ingress</code> shows an IP, pinging the designated host name resolves the expected IP, etc. I went through a few different tutes with the same results.</p>
<p>I boiled it down to the simplest replication from the tutorial at <a href="https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/" rel="nofollow noreferrer">kubernetes.io</a> :</p>
<pre><code># kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
# kubectl expose deployment web --type=NodePort --port=8080
# kubectl get service web (ensure it's a node port)
# minikube service web --url (test url)
# kubectl apply -f ingress_hello_world.yaml
# curl localkube.com
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: localkube.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 8080
</code></pre>
<p>Manual service works:</p>
<pre><code>&gt;minikube service web --url
http://127.0.0.1:50111
❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.

&gt;curl http://127.0.0.1:50111
Hello, world!
Version: 1.0.0
Hostname: web-84fb9498c7-hnphb
</code></pre>
<p>Ingress looks good:</p>
<pre><code>&gt;minikube addons list | grep ingress
| ingress                     | minikube | enabled ✅   | Kubernetes                     |

&gt;kubectl get ingress
NAME              CLASS   HOSTS           ADDRESS        PORTS   AGE
example-ingress   nginx   localkube.com   192.168.49.2   80      15m
</code></pre>
<p>ping resolves the address mapped in /etc/hosts:</p>
<pre><code>&gt;ping localkube.com
PING localkube.com (192.168.49.2): 56 data bytes
</code></pre>
<p>I have looked through similar questions with no positive results. I have gone from this simple example to apache to mongo deployments via config files. Each time I can get to the app through a manual service mapping or by creating an external service (LoadBalancer / nodePort), but when I get to the Ingress part the config applies with no errors and everything appears to be working except for it actually... working.</p>

Mike M
<p>Based on Veera's answer, I looked into the ingress issue with macOS and <code>minikube tunnel</code>. To save others the hassle, here is how I resolved the issue:</p>
<ol>
<li>ingress doesn't seem to work on macOS (the different pages say &quot;with docker&quot; but I had the same outcome with other drivers like hyperkit.</li>
<li>the issue seems to be IP / networking related. You can not get to the minikube IP from your local workstation. If you first run <code>minikube ssh</code> you can ping and curl the minikube IP and the domain name you mapped to that IP in /etc/hosts. However, this does not help trying to access the service from a browser.</li>
<li>the solution is to map the domain names to 127.0.0.1 in /etc/hosts (instead of the ingress assigned IP) and use ingress components to control the domain-name -&gt; service mappings as before...</li>
<li>then starting a tunnel with <code>sudo minikube tunnel</code> will keep a base tunnel open, and create tunneling for any existing or new ingress components. This combined with the ingress rules will mimic host header style connecting to any domain resolving to the local host.</li>
</ol>
<p>Here is a full example of a working solution on mac. Dump this to a file named ingress_hello_world.yaml and follow the commented instructions to achieve a simple ingress solution that routes 2 domains to 2 different services (note this will work with pretty much any internal service, and can be a ClusterIP instead of NodePort):</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
spec:
  ingressClassName: nginx
  rules:
    - host: test1.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 8080
    - host: test2.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web2
                port:
                  number: 8080

# Instructions:
# start minikube if not already
# &gt;minikube start --vm-driver=docker
#
# enable ingress if not already
# &gt;minikube addons enable ingress
# &gt;minikube addons list | grep &quot;ingress &quot;
# | ingress                     | minikube | enabled ✅   | Kubernetes                     |
#
# &gt;kubectl create deployment web --image=gcr.io/google-samples/hello-app:1.0
# deployment.apps/web created
#
# &gt;kubectl expose deployment web --type=NodePort --port=8080
# service/web exposed
#
# &gt;kubectl create deployment web2 --image=gcr.io/google-samples/hello-app:2.0
# deployment.apps/web2 created
#
# &gt;kubectl expose deployment web2 --port=8080 --type=NodePort
# service/web2 exposed
#
# &gt;kubectl get service | grep web
# web          NodePort    10.101.19.188   &lt;none&gt;        8080:31631/TCP   21m
# web2         NodePort    10.102.52.139   &lt;none&gt;        8080:30590/TCP   40s
#
# &gt;minikube service web --url
# http://127.0.0.1:51813
# ❗  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
#
# ------ in another console ------
# &gt;curl http://127.0.0.1:51813
#                          ^---- this must match the port from the output above
# Hello, world!
# Version: 1.0.0     &lt;---- will show version 2.0.0 for web2
# Hostname: web-84fb9498c7-7bjtg
# --------------------------------
# ctrl+c to kill tunnel in original tab, repeat with web2 if desired
#
# ------ In another console ------
# &gt;sudo minikube tunnel
# ✅  Tunnel successfully started
#
# (leave open, will show the following when you start an ingress component)
# Starting tunnel for service example-ingress.
# --------------------------------
#
# &gt;kubectl apply -f ingress_hello_world.yaml
# ingress.networking.k8s.io/example-ingress created
#
# &gt;kubectl get ingress example-ingress --watch
# NAME              CLASS   HOSTS                 ADDRESS   PORTS   AGE
# example-ingress   nginx   test1.com,test2.com             80      15s
# example-ingress   nginx   test1.com,test2.com   192.168.49.2   80      29s
#                wait for this to be populated ----^
#
# &gt;cat /etc/hosts | grep test
# 127.0.0.1    test1.com
# 127.0.0.1    test2.com
#        ^---- set this to localhost ip
#
# &gt;ping test1.com
# PING test1.com (127.0.0.1): 56 data bytes
#
# &gt;curl test1.com
# Hello, world!
# Version: 1.0.0
# Hostname: web-84fb9498c7-w6bkc
#
# &gt;curl test2.com
# Hello, world!
# Version: 2.0.0
# Hostname: web2-7df4dcf77b-66g5b

# ------- Cleanup:
# stop tunnel
#
# &gt;kubectl delete -f ingress_hello_world.yaml
# ingress.networking.k8s.io &quot;example-ingress&quot; deleted
#
# &gt;kubectl delete service web
# service &quot;web&quot; deleted
#
# &gt;kubectl delete service web2
# service &quot;web2&quot; deleted
#
# &gt;kubectl delete deployment web
# deployment.apps &quot;web&quot; deleted
#
# &gt;kubectl delete deployment web2
# deployment.apps &quot;web2&quot; deleted
</code></pre>
