<p>Hello every one i have just started to try out kubernetes and cant get my ingress resource and controllers to work correctly and route external traffic to my service in the cluster.
My Environment details
Docker-desktop for windows
kubernetes version 1.10.11 (obtained by command kubectl version)
OS=windows10 64 bit</p>

<p>i have fetched ingress from the following link
<a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/</a></p>

<p>by using these 2 commands </p>

<pre><code>kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yaml
</code></pre>

<p>and then i have created an ingress resource such as </p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
     kubernetes.io/ingress.class: nginx
  name: sample-ingress1
spec:
  rules:
  - host: mysuperbot.com
    http:
      paths:
      - path: /sampleingress
        backend:
          serviceName: tomcatappservice
          servicePort: 8082
</code></pre>

<p>my service resource is as follows</p>

<pre><code>---
apiVersion: v1
kind: Service
metadata:
  name: tomcatappservice
  labels:
    app: tomcat-app
spec:
  ports:
    - port: 8082
      protocol: TCP
      targetPort: 8080
  selector:
    app: tomcat-app
  type: NodePort



---
apiVersion: apps/v1beta1
kind: Deployment
metadata: 
  name: tomcat-app
  labels:
    app: tomcat-app
spec:
  replicas: 5
  selector:
    matchLabels:
      app: tomcat-app
  template:
    metadata:
      labels:
        app: tomcat-app
    spec:
      containers:
        - image: tomcatapp:v1.0.0 
          name: tomcat-app
          ports:
            - containerPort: 8080
</code></pre>

<p>and my host file has entry </p>

<pre><code>mysuperbot.com  localhost
</code></pre>

<p>but after all this when i try to access my service at mysuperbot.com/sampleingress i get error <code>ERR_NAME_RESOLUTION_FAILED</code> which leads me to believe my ingress controller isnt set up rightly so i check it with command </p>

<pre><code>kubectl get pods -n ingress-nginx
</code></pre>

<p>and output is as follows </p>

<pre><code>NAME                                        READY     STATUS    RESTARTS   AGE
nginx-ingress-controller-7d84dd6bdf-vnjx5   0/1       Pending   0          2h
</code></pre>

<p>which means my ingress pods arent starting up.Need help as to how can i test ingress on a local kubernetes cluster that comes with docker-desktop for windows</p>

<p>UPDATE </p>

<p>after running command </p>

<pre><code>kubectl -n ingress-nginx describe pod nginx-ingress-controller-7d84dd6bdf-vnjx5

Name:           nginx-ingress-controller-7d84dd6bdf-vnjx5
Namespace:      ingress-nginx
Node:           &lt;none&gt;
Labels:         app.kubernetes.io/name=ingress-nginx
                app.kubernetes.io/part-of=ingress-nginx
                pod-template-hash=3840882689
Annotations:    prometheus.io/port=10254
                prometheus.io/scrape=true
Status:         Pending
IP:
Controlled By:  ReplicaSet/nginx-ingress-controller-7d84dd6bdf
Containers:
  nginx-ingress-controller:
    Image:       quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1
    Ports:       80/TCP, 443/TCP
    Host Ports:  0/TCP, 0/TCP
    Args:
      /nginx-ingress-controller
      --configmap=$(POD_NAMESPACE)/nginx-configuration
      --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
      --udp-services-configmap=$(POD_NAMESPACE)/udp-services
      --publish-service=$(POD_NAMESPACE)/ingress-nginx
      --annotations-prefix=nginx.ingress.kubernetes.io
    Liveness:   http-get http://:10254/healthz delay=10s timeout=10s period=10s #success=1 #failure=3
    Readiness:  http-get http://:10254/healthz delay=0s timeout=10s period=10s #success=1 #failure=3
    Environment:
      POD_NAME:       nginx-ingress-controller-7d84dd6bdf-vnjx5 (v1:metadata.name)
      POD_NAMESPACE:  ingress-nginx (v1:metadata.namespace)
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from nginx-ingress-serviceaccount-token-8md24 (ro)
Conditions:
  Type           Status
  PodScheduled   False
Volumes:
  nginx-ingress-serviceaccount-token-8md24:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  nginx-ingress-serviceaccount-token-8md24
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  kubernetes.io/os=linux
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason            Age                 From               Message
  ----     ------            ----                ----               -------
  Warning  FailedScheduling  14s (x583 over 3h)  default-scheduler  0/1 nodes are available: 1 node(s) didn't match node selector.
</code></pre>

<p>In your ingress controller you have the node-selector 
kubernetes.io/os=linux
 you have to edit some of your nodes /your ingress configuration to match this label. </p>

<pre><code>kubectl get nodes - - show-labels
kubectl label nodes &lt;node-name&gt; &lt;label-key&gt;=&lt;label-value&gt;
</code></pre>

<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/</a></p>
