<p>I have a Kubernetes Cluster running on a 1 master, 2 worker setup ob linux servers. I have a HAProxy forwarding my requests to Nginx Controllers. My complete setup is behind a corporate proxy. The DNS entry is enabled in this corporate proxy.
Requests will get to the nginx controller, but wont be forwarded to the service.
I installed the ingress controller as descibed by many tutorials with the files in <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx</a> .</p>
<p>I'm new to stack overflow, so if i should give more specific information just let me know. I hope someone can help me with my issue, thank you in advance :D</p>
<p><strong>My Ingress with missing Address:</strong></p>
<pre><code>Name:             app-ingress
Namespace:        default
Address:
Default backend:  default-http-backend:80 (&lt;none&gt;)
Rules:
  Host                       Path  Backends
  ----                       ----  --------
  test.kubetest.lff.bybn.de
                             /abc   app-service:80 (10.244.2.4:3000)
Annotations:                 kubernetes.io/ingress.class: nginx
Events:                      &lt;none&gt;
</code></pre>
<p><strong>Yaml Files of Deployment, Service and Ingress, IngressClass, ConfigMap</strong></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: app
  name: app-blue
spec:
  replicas: 1
  selector:
    matchLabels:
      run: app
      version: 0.0.1
  template:
    metadata:
      labels:
        run: app
        version: 0.0.1
    spec:
      containers:
      - name: app
        image: errm/versions:0.0.1
        ports:
        - containerPort: 3000
----



apiVersion: v1
kind: Service
metadata:
  name: app-service
spec:
  selector:
    run: app
    version: 0.0.1
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 3000
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: app-ingress
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: test.kubetest.lff.bybn.de
    http:
      paths:
      - path: /abc
        backend:
          serviceName: app-service
          servicePort: 80
---

apiVersion: networking.k8s.io/v1beta1
kind: IngressClass
metadata:
  name: nginx
  # annotations:
  #   ingressclass.kubernetes.io/is-default-class: &quot;true&quot;
spec:
  controller: nginx.org/ingress-controller
---

kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-config
  namespace: nginx-ingress
data:
</code></pre>
<p><strong>Curl from outside of the Cluster and Logs from Controller Pod</strong></p>
<pre><code>curl test.kubetest.lff.bybn.de/abc
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    93    0    93    0     0      1      0 --:--:--  0:00:50 --:--:--    26&lt;html&gt;&lt;body&gt;&lt;h1&gt;504 Gateway Time-out&lt;/h1&gt;
The server didn't respond in time.
&lt;/body&gt;&lt;/html&gt;



E0131 19:44:11.949261       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E0131 19:45:06.894791       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E0131 19:45:48.532075       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
10.48.25.57 - - [31/Jan/2021:19:46:35 +0000] &quot;GET /abc HTTP/1.1&quot; 499 0 &quot;-&quot; &quot;curl/7.73.0&quot; &quot;-&quot;
E0131 19:46:37.902444       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E0131 19:47:15.346193       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E0131 19:47:48.536636       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
E0131 19:48:21.890770       1 reflector.go:138] /home/runner/work/kubernetes-ingress/kubernetes-ingress/internal/k8s/controller.go:574: Failed to watch *v1.Policy: failed to list *v1.Policy: the server could not find the requested resource (get policies.k8s.nginx.org)
</code></pre>

jergan95
<p>Looking at the Ingress definition, I see that it misses the ingress class. Either you defined an IngressClass annotated as the default class to use, or that may be the reason your Ingress is not working, at the moment.</p>
<p>An Ingress Class is basically a category which specify who needs to serve and manage the Ingress, this is necessary since in a cluster you can have more than one Ingress controller, each one with its rules and configurations.</p>
<p>Depending on the Kubernetes version, the ingress class can be defined with an annotation on the ingress (before v1.18) such as:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: example-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
spec:
  ...
</code></pre>
<p>Or with a whole resource and then referred into the Ingress as shown in the documentation (<a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class</a>)</p>
<p>Even in new versions of Kubernetes, the old annotation may still be supported, depends on the controller.</p>
<p>If you are unsure on what ingress class you should use, that should be defined by the controller, you probably decided one when you installed it or you used the default one (which most of the times is nginx)</p>
