<p>I’m quite new to k8s in general, only been using for smaller projects but made it work. I hope btw this is the right channel to ask questions (in this case about ingress-nginx). I’m trying to setup a cluster with a gateway-api and a few microservices (all written in NestJs). To give a little background, I first had everything in docker-compose and my entry was also a Nginx container with letsencrypt. The whole docker, works great locally.</p>
<p>This was the config used for my NGinx Docker:</p>
<pre><code>upstream equmedia-api {
    server equmedia-api:3000;
}

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name localhost;
    return 301 https://$server_name$request_uri;
}

server {
    listen 80;
    listen 443 ssl http2 default_server;
    listen [::]:443 ssl http2 default_server;
    keepalive_timeout 70;
    server_name subdomain.example.com;

    ssl_session_cache shared:SSR:10m;
    ssl_session_timeout 10m;
    ssl_certificate /etc/letsencrypt/live/equmedia.pixeliner.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/equmedia.pixeliner.com/privkey.pem;

    access_log /var/log/nginx/nginx.access.log;
    error_log /var/log/nginx/nginx.error.log;

    location / {
        proxy_pass http://equmedia-api;
        # proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
</code></pre>
<p>As you can see, it upstreamed to my api container.</p>
<p>Eventually I wanted to turn the whole deployment into k8s. Seemed like a good followup practice after the small projects.</p>
<p>I learned about ingress-nginx and gave it my first try, but I seem to have struck a wall.</p>
<p>Here is the setup I'm trying to achieve:</p>
<p><a href="https://i.stack.imgur.com/DH7uz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DH7uz.png" alt="k8s setup" /></a></p>
<p>Through DigitalOcean the setup will be behind a LoadBalancer.</p>
<p>Here is my Ingress NGinx controller:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: equmedia-ingress-api
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;    
    cert-manager.io/issuer: &quot;letsencrypt-prod&quot;
    nginx.ingress.kubernetes.io/rewrite-target: &quot;/&quot;
    nginx.ingress.kubernetes.io/proxy-protocol: &quot;true&quot;
    nginx.ingress.kubernetes.io/ssl-proxy-headers: &quot;X-Forwarded-Proto: https&quot;
spec:
  tls:
  - hosts:
    - subdomain.example.com
    secretName: quickstart-example-tls
  rules:
  - host: subdomain.example.com
    http:
      paths:
      - path: /api
        pathType: Prefix
        backend:
          service:
            name: equmedia-api
            port:
              number: 3000

</code></pre>
<p>And my api service:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  creationTimestamp: null
  labels:
    io.kompose.service: equmedia-api
  name: equmedia-api
spec:
  ports:
    - port: 3000
      targetPort: 3000
  selector:
    io.kompose.service: equmedia-api
status:
  loadBalancer: {}

</code></pre>
<p>When I try to access &quot;https://subdomain.example.com/api/health&quot;, I get a 504 Gateway Time-out. Looking at the ingress controller logs I get the following:</p>
<pre><code>2023/02/17 15:51:44 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
2023/02/17 15:51:49 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
2023/02/17 15:51:54 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
</code></pre>
<p>Anyone that can point me into the right direction, to fix this issue?</p>
<p><strong>EDIT</strong></p>
<p>The outcome for</p>
<p><code>kubectl get pods -l io.kompose.service=equmedia-api</code>:</p>
<pre><code>NAME           READY   STATUS    RESTARTS   AGE
equmedia-api   1/1     Running   0          2d2h
</code></pre>
<p><code>kubectl get svc</code>:</p>
<pre><code>NAME                                            TYPE           CLUSTER-IP      EXTERNAL-IP       PORT(S)                      AGE
equmedia-api                                    ClusterIP      10.245.173.11   &lt;none&gt;            3000/TCP                     23h
equmedia-api-rabbitmq                           ClusterIP      10.245.17.225   &lt;none&gt;            5672/TCP,15673/TCP           2d17h
equmedia-api-redis                              ClusterIP      10.245.120.11   &lt;none&gt;            6379/TCP                     2d17h
equmedia-auth-db                                ClusterIP      10.245.94.21    &lt;none&gt;            5432/TCP                     2d17h
kubernetes                                      ClusterIP      10.245.0.1      &lt;none&gt;            443/TCP                      2d17h
quickstart-ingress-nginx-controller             LoadBalancer   10.245.36.216   179.128.139.106   80:31194/TCP,443:31609/TCP   2d16h
quickstart-ingress-nginx-controller-admission   ClusterIP      10.245.232.77   &lt;none&gt;            443/TCP                      2d16h
</code></pre>
<p>EDIT2:</p>
<p>I've requested my domain <a href="https://subdomain.example.com/api/health" rel="nofollow noreferrer">https://subdomain.example.com/api/health</a> through browser, curl and postman. All of them return timeouts.</p>
<p><code>kubectl get pods -A -o wide | grep 10.244.0.228 </code> returns:</p>
<pre><code>default        equmedia-api                                           1/1     Running   0               2d4h    10.244.0.228   temp-pool-qyhii   &lt;none&gt;           &lt;none&gt;
</code></pre>
<p><code>kubectl get svc -A | grep 10.244.0.228</code> returns nothing</p>
<p>EDIT3:</p>
<p>Here is the logs of my API:</p>
<pre><code>[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [NestFactory] Starting Nest application...
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] AppModule dependencies initialized +136ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] RedisCacheModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] UtilsModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] AxiosWrapperModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] PassportModule dependencies initialized +32ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] JwtModule dependencies initialized +3ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] TerminusModule dependencies initialized +2ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +2ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ScheduleModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] BullModule dependencies initialized +61ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +17ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +7ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ClientsModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] HealthModule dependencies initialized +8ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] CacheModule dependencies initialized +2ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] MailModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] HttpModule dependencies initialized +3ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] BullModule dependencies initialized +24ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] BullQueueModule dependencies initialized +7ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] PaymentModule dependencies initialized +8ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] CustomerModule dependencies initialized +1ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] ContentModule dependencies initialized +2ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] AdserveModule dependencies initialized +3ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] AuthModule dependencies initialized +2ms
[Nest] 1  - 02/17/2023, 10:52:27 AM     LOG [InstanceLoader] OpenIdModule dependencies initialized +65ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] HealthController {/api/health}: +18ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/health, GET} route +5ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/health/check-ping, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/health/check-disk, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/health/check-memory, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/health/check-microservice/:name, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] OpenIdController {/api/open-id}: +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/open-id/login, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/open-id/user, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/open-id/callback, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/open-id/logout, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] AuthController {/api/auth}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/auth, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/auth/signup, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/auth/signin, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/auth/signout, POST} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/auth/refresh, GET} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] UserController {/api/user}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/get-user-id/email?, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/get-authenticated-user, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/:id/change-user-password, PUT} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/:id/delete-user-account, DELETE} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/confirm/:token, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/forgot-password, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/user/set-new-password/:token, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] UsersController {/api/users}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/users, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] PaymentController {/api/payment}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/payment/:id, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/payment/create/:id, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/payment/:id, PUT} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] CustomerController {/api/customer}: +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/customer, GET} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/customer/profile/:id, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/customer/create, POST} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/customer/delete/:id, DELETE} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/customer/update/:id, PUT} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] ContentController {/api/content}: +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content, GET} route +2ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content/create, POST} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content/update/:contentId, PUT} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content/delete/:contentId, DELETE} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content/category/:categoryId, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/content/slug/:slug, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] CategoryController {/api/category}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/category, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/category/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/category/update/:categoryId, PUT} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/category/delete/:categoryId, DELETE} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] WidgetController {/api/widget}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/widget, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/widget/create, POST} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/widget/update/:widgetId, PUT} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/widget/delete/:widgetId, DELETE} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] AdvertiserController {/api/adserve/advertiser}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/:advertiserId, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/:advertiserId/campaigns/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/:advertiserId/campaigns/:campaignId, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/:advertiserId/campaigns/:campaignId/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/advertiser/:advertiserId/campaigns/:campaignId/assign, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] AdserveController {/api/adserve}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/serve, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/redirect, GET} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] PublisherController {/api/adserve}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/publisher, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/publisher/:publisherId, GET} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/publisher/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/publisher/:publisherId/zone/create, POST} route +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RoutesResolver] ReportController {/api/adserve/report}: +1ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [RouterExplorer] Mapped {/api/adserve/report, GET} route +0ms
[Nest] 1  - 02/17/2023, 10:52:28 AM     LOG [NestApplication] Nest application successfully started +58ms
-- API GATEWAY RUNNING - PORT: 3000  --
</code></pre>
<p>No errors are logged, and through a port-forward I also see my api working.</p>
<p>EDIT4:</p>
<p>Here is the gist with all pods/services/claims/...</p>
<p><a href="https://gist.github.com/pixeliner/2c89048294197155b0d4833ab4045f3c" rel="nofollow noreferrer">https://gist.github.com/pixeliner/2c89048294197155b0d4833ab4045f3c</a></p>

<p>Your output text:</p>
<pre><code>2023/02/17 15:51:44 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
2023/02/17 15:51:49 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
2023/02/17 15:51:54 [error] 356#356: *336457 upstream timed out (110: Operation timed out) while connecting to upstream, client: 164.92.221.107, server: subdomain.example.com, request: &quot;GET /api/health HTTP/2.0&quot;, upstream: &quot;http://10.244.0.228:3000/&quot;, host: &quot;subdomain.example.com&quot;
</code></pre>
<p>Implies the request is timing out on the IP <code>10.244.0.228:3000</code></p>
<p>Things to check:</p>
<ul>
<li><p>Is the service IP <code>10.244.0.228</code>: <code>kubectl get svc equmedia-api</code> (it will likely be of type <code>ClusterIP</code>)</p>
</li>
<li><p>Port forward to the service directly: <code>kubectl port-forward svc/equmedia-api 3000:3000</code> and then try to access <code>localhost:3000</code> in another terminal or in your browser. Does it respond, does it error or does it timeout?</p>
</li>
<li><p>Check the pods your service is trying to match: <code>kubectl get pods -l io.kompose.service=equmedia-api</code> -- does this return any pods? If so, are they in <code>Ready</code> state or are they erroring? Do they have a value greater than 0 in the <code>Restarts</code> count?</p>
</li>
<li><p>Check the logs of the pod(s) <code>kubectl logs -f {pod-name}</code> and see if it is unable to start up, or if it is repeatedly starting.</p>
</li>
</ul>
<hr />
<p>UPDATE 1</p>
<p>Please add the output of the following commands to your question. Wrap the output with three backticks (`) on a single line before and after to preserve formatting:</p>
<pre><code>kubectl get pods -l io.kompose.service=equmedia-api
</code></pre>
<pre><code>kubectl get svc
</code></pre>
<hr />
<p>UPDATE 2</p>
<p>Since the IP that your controller is <code>10.244.0.228</code> see if any of your pods or services actually have that IP. Please add the output of these commands:</p>
<pre><code>kubectl get pods -A -o wide | grep 10.244.0.228
</code></pre>
<pre><code>kubectl get svc -A | grep 10.244.0.228
</code></pre>
<hr />
<p>UPDATE 3</p>
<p>I've yet to try deploying the gist, but I have noticed something</p>
<p>You have networkpolicies setup and you have labelled your pod</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  creationTimestamp: null
  labels:
    io.kompose.network/backend: &quot;true&quot; # &lt;&lt;--- HERE
    io.kompose.service: equmedia-api
  name: equmedia-api-pod
spec:
...
</code></pre>
<p>This matches your network policy here:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  creationTimestamp: null
  name: backend
spec:
  ingress:
    - from:
      - podSelector:
          matchLabels:
            io.kompose.network/backend: &quot;true&quot;
  podSelector:
    matchLabels:
      io.kompose.network/backend: &quot;true&quot;
</code></pre>
<p>Now, this network policy reads (based in the information off <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">this link</a>)</p>
<p>&quot;Allow connections from Pods with the label <code>io.kompose.network/backend=&quot;true&quot;</code> (last three lines) to pods that match the labels <code>io.kompose.network/backend=&quot;true&quot;</code> (the <code>ingress.from.podSelector</code> bit)</p>
<p>Sooo.... assuming I'm reading this correct, the reason the ingress controller is not able to talk to the pod, is because the controller pod does not have a label <code>io.kompose.network/backend=&quot;true&quot;</code>, and since you did not include that in your gist, I'm assuming you're using the ingress controller chart as a subchart/dependency. And if so, then out of the box, that chart won't have this label. This would explain why we were able to port-forward to the pod and the service directly, but the controller pod was not able to talk to the pod.</p>
<p>And easy way to verify this is to either delete the <code>backend</code> networkpolicy, or modify it to allow all ingress traffic as a test (something like the example <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/#allow-all-ingress-traffic" rel="nofollow noreferrer">here</a>)</p>
<p>If this works, it will confirm the networkpolicy is blocking the traffic.</p>
