<p>Now I'm using WSL 2 and Docker Desktop on Windows 10.</p>
<p>I created an YAML script to create an ingress for my microservices like below.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-srv
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
    - host: posts.com
      http:
        paths:
          - path: /posts
            pathType: Prefix
            backend:
              service:
                name: posts-clusterip-srv
                port:
                  number: 4000
</code></pre>
<p>And I installed ingress-nginx by following this <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">installation guide</a></p>
<p>I ran this command in the guide.</p>
<p><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.4.0/deploy/static/provider/cloud/deploy.yaml</code></p>
<p>But when I ran <code>kubectl get pods --namespace=ingress-nginx</code>, <code>ingress-nginx-controller</code> shows <code>ImageInspectError</code>
<a href="https://i.stack.imgur.com/uthyL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uthyL.png" alt="ImageInspectError" /></a></p>
<p>And when I ran the command <code>kubectl apply -f ingress-srv.yaml</code>, it showed an error message.
<a href="https://i.stack.imgur.com/5li4R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5li4R.png" alt="Ingress error message" /></a></p>
<p>Can anyone please let me know what the issue is?</p>
<p>I removed the namespace <code>ingress-nginx</code> using this command <code>kubectl delete all  --all -n ingress-nginx</code> and ran the deploy script again.</p>
<p><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.4.0/deploy/static/provider/cloud/deploy.yaml</code></p>
<p>But the issue still happened.</p>

Daniel Morales
<p>There is an issue deploying ingress-nginx controller. You need to first fix issues there before deploying the ingress. Because, only the nginx controller knows how to handle the ingress resources.</p>
<p>Since there is no much info about the controller deployment failure, you better add more details about the error. You can describe the controller pod and share its event and status to look into this further.</p>
