<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>It was because of the corrupted filesystem.</p>
<p>When I ran the ingress-nginx deployment command, there was a docker-desktop crash because of the lack of drive storage size.</p>
<p>So I removed all corrupted, unused or dangling docker images.</p>
<p><code>docker system prune</code></p>
<p>Also I deleted ingress-nginx and reinstalled.</p>
<p><code>kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.4.0/deploy/static/provider/cloud/deploy.yaml</code></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>After that, it worked well.</p>
<p><code>kubectl get pods --namespace=ingress-nginx</code></p>
<pre><code>NAME                                        READY   STATUS      RESTARTS   AGE
ingress-nginx-admission-create-tgkfx        0/1     Completed   0          74m
ingress-nginx-admission-patch-28l7q         0/1     Completed   3          74m
ingress-nginx-controller-7844b9db77-4dfvb   1/1     Running     0          74m
</code></pre>
