<p>I know that they are tons of similar problem but after I have read all of them I am not able to figure it out... :/</p>
<p><strong>First of all I am not using minikube, I am using kubernetes docker desktop.</strong></p>
<p>I have simple express.js server like:</p>
<pre><code>app.get('/test', async (_, res) =&gt; {
  console.log(&quot;Sth happened&quot;)
  res.json({ status: 200 });
});
</code></pre>
<p><strong>I am trying to deploy it and use ingress to expose it to my localhost.</strong></p>
<p>What I have done:
In etc/hosts I have added:</p>
<pre><code>127.0.0.1 123test.mydomain.com
</code></pre>
<p>The ingress looks like:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mytestservice
  namespace: mytestservice
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;
spec:
  rules:
    - host: 123test.mydomain.com
      http:
        paths:
          - pathType: ImplementationSpecific
            path: /
            backend:
              service:
                name: mytestservice
                port:
                  number: 80
</code></pre>
<p>Service:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: mytestservice
spec:
  ports:
  - name: http
    port: 80
    targetPort: 3000
  selector:
    name: mytestservice
</code></pre>
<p>Deployment:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: mytestservice
spec:
  replicas: 1
  selector:
    matchLabels:
      name: mytestservice
  template:
    metadata:
      labels:
        name: mytestservice
    spec:
      containers:
        - name: mytestservice
          image: myimagename
          imagePullPolicy: IfNotPresent 
          ports:
            - containerPort: 3000
          env:
              ...my envs, doesnt matter
</code></pre>
<p><strong>When I deploy it the pod is up and running because I am able to see startup logs</strong>
The ingress description</p>
<pre><code>kubectl get ingress mytestservice
NAME        CLASS    HOSTS                     ADDRESS   PORTS     AGE
mytestservice   &lt;none&gt;   123test.mydomain.com             80, 443   53s

kubectl describe ingress mytestservice
Name:             mytestservice
Namespace:        mytestservice
Address:
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host                     Path  Backends
  ----                     ----  --------
  123test.mydomain.com
                           /   mytestservice:80 (10.1.0.16:3000)
Annotations:               kubernetes.io/ingress.class: nginx
                           meta.helm.sh/release-name: mytestservice
                           meta.helm.sh/release-namespace: mytestservice
Events:                    &lt;none&gt;
</code></pre>
<p>When i CURL it I receive:</p>
<pre><code>curl 123test.mydomain.com/test
curl: (7) Failed to connect to 123test.mydomain.com port 80: Connection refused 
</code></pre>

Mateusz Gebroski
<p>The problem is DNS. With your local /etc/hosts you are pointing to localhost instead to the IP of your Kubernetes host.</p>
