<p>I am trying to make this basic example work on docker desktop on windows, I am not using <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">minikube</a>.</p>
<p>I managed to reach the service using NodePort with:</p>
<pre><code>http://localhost:31429
</code></pre>
<p>But when I try <code>http://hello-world.info</code> (made sure to add it in hosts) - <code>404 not found</code>.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>kubectl get svc --all-namespaces
NAMESPACE       NAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
default         kubernetes                           ClusterIP      10.96.0.1        &lt;none&gt;        443/TCP                      20m
default         web                                  NodePort       10.111.220.81    &lt;none&gt;        8080:31429/TCP               6m47s
ingress-nginx   ingress-nginx-controller             LoadBalancer   10.107.29.182    localhost     80:30266/TCP,443:32426/TCP   19m
ingress-nginx   ingress-nginx-controller-admission   ClusterIP      10.101.138.244   &lt;none&gt;        443/TCP                      19m
kube-system     kube-dns                             ClusterIP      10.96.0.10       &lt;none&gt;        53/UDP,53/TCP,9153/TCP       20m



kubectl get ingress
NAME              CLASS    HOSTS              ADDRESS   PORTS   AGE
example-ingress   &lt;none&gt;   hello-world.info             80      21m</code></pre>
</div>
</div>
</p>
<p>I am lost, can someone please help ?
I also noticed that ADDRESS is empty.</p>
<p>Many thanks.</p>

<p><em>Reproduced this case on Docker Desktop 4.1.1, Windows 10 Pro</em></p>
<ol>
<li><p>Install <a href="https://kubernetes.github.io/ingress-nginx/deploy/#docker-desktop" rel="nofollow noreferrer">Ingress Controller for Docker Desktop</a>:</p>
<p><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/cloud/deploy.yaml</code></p>
</li>
<li><p>As I understand it, @dev1334 used an example from <a href="https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/" rel="nofollow noreferrer">Set up Ingress on Minikube with the NGINX Ingress Controller</a> article. I also tried it with some modifications to the original example.</p>
</li>
<li><p>In the example for the <code>example-ingress.yaml</code> file in the <code>spec.rules</code> section, the host <code>hello-world.info</code> is specified. Since Docker Desktop for Windows adds to a hosts file in <code>C:\Windows\System32\drivers\etc\hosts</code> during installation the following entry: <code>127.0.0.1 kubernetes.docker.internal</code> I changed the host in the <code>example-ingress.yaml</code> from <code>hello-world.info</code> to <code>kubernetes.docker.internal</code></p>
</li>
<li><p>But Ingress still didn't work as expected due to the following error:
<code>&quot;Ignoring ingress because of error while validating ingress class&quot; ingress=&quot;default/example-ingress&quot; error=&quot;ingress does not contain a valid IngressClass&quot;</code></p>
<p>I added this line <code>kubernetes.io/ingress.class: &quot;nginx&quot;</code> to the annotations section in <code>example-ingress.yaml</code></p>
</li>
</ol>
<p>So, the final version of the  <code>example-ingress.yaml</code> file is below.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;
    nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
  rules:
    - host: kubernetes.docker.internal
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 8080
          - path: /v2
            pathType: Prefix
            backend:
              service:
                name: web2
                port:
                  number: 8080
</code></pre>
<p><strong>Test results</strong></p>
<pre><code>C:\Users\Andrew_Skorkin&gt;kubectl get po -A
NAMESPACE       NAME                                        READY   STATUS      RESTARTS   AGE
default         web-79d88c97d6-c8xnf                        1/1     Running     0          112m
default         web2-5d47994f45-cxtzm                       1/1     Running     0          94m
ingress-nginx   ingress-nginx-admission-create-sjdcq        0/1     Completed   0          114m
ingress-nginx   ingress-nginx-admission-patch-wccc9         0/1     Completed   1          114m
ingress-nginx   ingress-nginx-controller-5c8d66c76d-jb4w9   1/1     Running     0          114m
...

C:\Users\Andrew_Skorkin&gt;kubectl get svc -A
NAMESPACE       NAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
default         kubernetes                           ClusterIP      10.96.0.1        &lt;none&gt;        443/TCP                      7d15h
default         web                                  NodePort       10.101.43.157    &lt;none&gt;        8080:32651/TCP               114m
default         web2                                 NodePort       10.100.4.84      &lt;none&gt;        8080:30081/TCP               96m
ingress-nginx   ingress-nginx-controller             LoadBalancer   10.106.138.217   localhost     80:30287/TCP,443:32664/TCP   116m
ingress-nginx   ingress-nginx-controller-admission   ClusterIP      10.111.208.242   &lt;none&gt;        443/TCP                      116m
kube-system     kube-dns                             ClusterIP      10.96.0.10       &lt;none&gt;        53/UDP,53/TCP,9153/TCP       7d15h

C:\Users\Andrew_Skorkin&gt;curl kubernetes.docker.internal
Hello, world!
Version: 1.0.0
Hostname: web-79d88c97d6-c8xnf

C:\Users\Andrew_Skorkin&gt;curl kubernetes.docker.internal/v2
Hello, world!
Version: 2.0.0
Hostname: web2-5d47994f45-cxtzm
</code></pre>
