<p>My goal is to setup an <strong>ingress nginx</strong> within my kubernetes cluster. The deployment seems to work as I guess, the logs are looking good.</p>
<pre><code>NAME                                            READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create--1-n5h28     0/1     Completed   0          4d8h
pod/ingress-nginx-admission-patch--1-czsfn      0/1     Completed   0          4d8h
pod/ingress-nginx-controller-7f7f8685b8-xvldg   1/1     Running     0          10m
pod/web-app-59555dbf95-slqc4                    1/1     Running     0          20m

NAME                                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
service/ingress-nginx-controller             NodePort    10.97.224.250   &lt;none&gt;        80:32666/TCP,443:31657/TCP   4d8h
service/ingress-nginx-controller-admission   ClusterIP   10.100.7.97     &lt;none&gt;        443/TCP                      4d8h
service/web-app-internal                     ClusterIP   10.103.22.145   &lt;none&gt;        80/TCP                       20m

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-controller   1/1     1            1           4d8h
deployment.apps/web-app                    1/1     1            1           20m

NAME                                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-controller-55b65fcbff   0         0         0       22h
replicaset.apps/ingress-nginx-controller-5f7d486f4d   0         0         0       43m
replicaset.apps/ingress-nginx-controller-76bdf9b5f6   0         0         0       3h47m
replicaset.apps/ingress-nginx-controller-7d7489d947   0         0         0       44m
replicaset.apps/ingress-nginx-controller-7f7f8685b8   1         1         1       10m
replicaset.apps/ingress-nginx-controller-7fdc4896dd   0         0         0       22h
replicaset.apps/ingress-nginx-controller-86668dc4fc   0         0         0       22h
replicaset.apps/ingress-nginx-controller-8cf5559f8    0         0         0       4d8h
replicaset.apps/ingress-nginx-controller-f58499759    0         0         0       62m
replicaset.apps/web-app-59555dbf95                    1         1         1       20m

NAME                                       COMPLETIONS   DURATION   AGE
job.batch/ingress-nginx-admission-create   1/1           2s         4d8h
job.batch/ingress-nginx-admission-patch    1/1           7s         4d8h
</code></pre>
<p>I've already experienced some issues, stated in <a href="https://stackoverflow.com/questions/69167854/kubernetes-ingress-nginx-controller-internal-error-occurred-failed-calling-web">this question</a>.
The deployment I use is the following:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-app
  namespace: ingress-nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web-app
  template:
    metadata:
      labels:
        app: web-app
    spec:
      containers:
      - name: web-app
        image: registry/web-app:latest
        resources:
          limits:
            memory: &quot;128Mi&quot;
            cpu: &quot;500m&quot;
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: web-app-internal
  namespace: ingress-nginx
spec:
  selector:
      app: web-app
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;
    nginx.ingress.kubernetes.io/backend-protocol: &quot;HTTP&quot;
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
    nginx.ingress.kubernetes.io/enable-access-log: &quot;true&quot;
  name: web-app-ingress
  namespace: ingress-nginx
  labels:
    name: web-app-ingress
spec:
  rules:
  - host: web.app
    http:
      paths:
      - pathType: Prefix
        path: &quot;/&quot;
        backend:
          service:
            name: web-app-internal
            port: 
              number: 80
</code></pre>
<p>First of all, let me explain, that I try to make the ingress accessible via <code>http</code> internally for the moment. When this is working, the next step will be to establish a <code>ssl</code> certified connection.</p>
<p>Last but not least, a few more relevant data:</p>
<ul>
<li>the host defined within the ingress rule resolves to the ip of the externally hosted load-balancer outside the cluster within my own network</li>
<li><code>curl -v http://web.app</code> returns the following output:</li>
</ul>
<pre><code>*   Trying x.x.x.x...
* TCP_NODELAY set
* Connected to web.app (x.x.x.x) port 80 (#0)
&gt; GET / HTTP/1.1
&gt; Host: web.app
&gt; User-Agent: curl/7.64.1
&gt; Accept: */*
&gt; 
* HTTP 1.0, assume close after body
&lt; HTTP/1.0 400 Bad Request
&lt; 
Client sent an HTTP request to an HTTPS server.
* Closing connection 0
</code></pre>
<p>I'm a newbie to all things k8s related, any guess what I miss?</p>
<p>Many thanks in advice!</p>

<p>No, solved the problem. It was an incorrect nginx load-balancer setup. Did indeed pass the <strong>443</strong> and <strong>80</strong> traffic, but not to the exposed Port for <strong>http</strong> on my worker nodes the <strong>ingress-nginx-controller</strong> service allocated. After this, everything works fine.</p>
