title: How can I access nginx ingress on my local?
body: <p>I can't connect to my app running with nginx ingress (Docker Desktop win 10).</p>
  
  <p>The nginx-ingress controller pod is running, the app is healthy, and I have created an ingress. However, when I try to connect to my app on localhost, I get "connection refused".</p>
  
  <p>I see this error in the log:</p>
  
  <pre><code>[14:13:13.028][VpnKit            ][Info   ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6
  
  [14:13:13.028][VpnKit            ][Info   ] vpnkit.exe: UDP interface connected on 10.96.181.150
  
  [14:13:22.320][GoBackendProcess  ][Info   ] Adding vpnkit-k8s-controller tcp forward from 0.0.0.0:80 to 10.96.47.183:80
  [14:13:22.323][ApiProxy          ][Error  ] time="2019-12-09T14:13:22-05:00" msg="Port 443 for service ingress-nginx is already opened by another service"
  </code></pre>
  
  <p>I think port 443 is used by another app, possibly zscaler security or skype.
  Excerpt from <code>netstat -a -b</code>:</p>
  
  <pre><code> [svchost.exe]
    TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       16012
   [com.docker.backend.exe]
    TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       8220
  </code></pre>
  
  <p>I don't know how to make the ingress work. Please help!</p>
  
  <p>My ingress:</p>
  
  <pre><code>$ kubectl describe ing kbvalues-deployment-dev-ingress
  Name:             kbvalues-deployment-dev-ingress
  Namespace:        default
  Address:          localhost
  Default backend:  default-http-backend:80 (&lt;none&gt;)
  Rules:
    Host       Path  Backends
    ----       ----  --------
    localhost
               /   kbvalues-deployment-dev-frontend:28000 (10.1.0.174:8080)
  Annotations:
    kubernetes.io/ingress.class:                     nginx
    nginx.ingress.kubernetes.io/cors-allow-headers:  X-Forwarded-For, X-app123-XPTO
  Events:
    Type    Reason  Age               From                      Message
    ----    ------  ----              ----                      -------
    Normal  CREATE  42m               nginx-ingress-controller  Ingress default/kbvalues-deployment-dev-ingress
    Normal  UPDATE  6s (x5 over 42m)  nginx-ingress-controller  Ingress default/kbvalues-deployment-dev-ingress
  </code></pre>
  
  <p>My service:</p>
  
  <pre><code>$ kubectl describe svc kbvalues-deployment-dev-frontend
  Name:              kbvalues-deployment-dev-frontend
  Namespace:         default
  Labels:            chart=tomcat-sidecar-war-1.0.4
                     environment=dev
                     name=kbvalues-frontend-dev
                     release=kbvalues-test
                     tier=frontend
  Annotations:       &lt;none&gt;
  Selector:          app=kbvalues-dev
  Type:              ClusterIP
  IP:                10.98.89.94
  Port:              &lt;unset&gt;  28000/TCP
  TargetPort:        8080/TCP
  Endpoints:         10.1.0.174:8080
  Session Affinity:  None
  Events:            &lt;none&gt;
  </code></pre>
  
  <p>I am trying to access the app at: <code>http://localhost:28000/health</code>. I verified that the <code>/health</code> URL is accessible locally within the web server container.</p>
  
  <p>I appreciate any help you can offer.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I tried altering the ingress-nginx service to remove HTTPS, as suggested here:
  <a href="https://stackoverflow.com/a/56303330/166850">https://stackoverflow.com/a/56303330/166850</a></p>
  
  <p>This got rid of the 443 error in the logs, but didn't fix my setup (still getting connection refused).</p>
  
  <p><strong>Edit 2:</strong> Here is the Ingress YAML definition (kubectl get -o yaml):</p>
  
  <pre><code>$ kubectl get ing -o yaml
  apiVersion: v1
  items:
  - apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      annotations:
        kubernetes.io/ingress.class: nginx
      creationTimestamp: "2019-12-09T18:47:33Z"
      generation: 5
      name: kbvalues-deployment-dev-ingress
      namespace: default
      resourceVersion: "20414"
      selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/kbvalues-deployment-dev-ingress
      uid: 5c34bf7f-1ab4-11ea-80e4-00155d169409
    spec:
      rules:
      - host: localhost
        http:
          paths:
          - backend:
              serviceName: kbvalues-deployment-dev-frontend
              servicePort: 28000
            path: /
    status:
      loadBalancer:
        ingress:
        - hostname: localhost
  kind: List
  metadata:
    resourceVersion: ""
    selfLink: ""
  </code></pre>
  
  <p><strong>Edit 3:</strong> Output of <code>kubectl get svc -A</code> (ingress line only):</p>
  
  <pre><code>ingress-nginx   ingress-nginx                      LoadBalancer   10.96.47.183     localhost     80:30470/TCP             21h
  </code></pre>
  
  <p><strong>Edit 4:</strong> I tried to get the VM's IP address from windows HyperV, but it seems like the VM doesn't have an IP?</p>
  
  <pre><code>PS C:\&gt; (Get-VMNetworkAdapter -VMName DockerDesktopVM)
  
  Name            IsManagementOs VMName          SwitchName MacAddress   Status IPAddresses
  ----            -------------- ------          ---------- ----------   ------ -----------
  Network Adapter False          DockerDesktopVM DockerNAT  00155D169409 {Ok}   {}
  </code></pre>
  
  <p><strong>Edit 5:</strong></p>
  
  <p>Output of <code>netstat -a -n -o -b</code> for port 80:</p>
  
  <pre><code>  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
   Can not obtain ownership information
  </code></pre>