<p>I have HA proxy ingress installed on Kubernetes AKS. I installed it using:</p>
<pre><code>helm install ingress haproxy-ingress/haproxy-ingress
</code></pre>
<p>My ingress is this:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress  
metadata:
  name: ravendb
  namespace: default
  labels:
    app: ravendb
  annotations:
    ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
spec:
  rules:
  - host: a.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-0
          servicePort: 443
        path: /
  - host: tcp-a.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-0
          servicePort: 38888
        path: /
  - host: b.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-1
          servicePort: 443
        path: /
  - host: tcp-b.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-1
          servicePort: 38888
        path: /
  - host: c.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-2
          servicePort: 443
        path: /
  - host: tcp-c.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-2
          servicePort: 38888
        path: /
</code></pre>
<p>However when I point my browser to <a href="https://a.raven.aedas-prev.inercya.com" rel="nofollow noreferrer">https://a.raven.aedas-prev.inercya.com</a> I get the default backend. HA proxy doesn't reverse proxy the request to ravendb-0 service.</p>
<p>What I'm doing wrong? What can I do to make the ingress work?</p>
<p>Pods are running:</p>
<pre><code>haproxy-ingress-8548ff5ff4-9wmxv            1/1     Running            0          137m
ingress-default-backend-b6f678779-9d88r     1/1     Running            0          137m
ravendb-0                                   1/1     Running            0          137m
ravendb-1                                   1/1     Running            0          139m
ravendb-2                                   1/1     Running            0          141m
</code></pre>
<p>And services are configured:</p>
<pre><code>NAME                       TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                        AGE
haproxy-ingress            LoadBalancer   10.0.166.252   xx.xx.xx.xx    443:30526/TCP,1936:32388/TCP   139m
ingress-default-backend    ClusterIP      10.0.102.165   &lt;none&gt;           8080/TCP                       139m
kubernetes                 ClusterIP      10.0.0.1       &lt;none&gt;           443/TCP                        412d
ravendb                    ClusterIP      None           &lt;none&gt;           443/TCP,38888/TCP,161/TCP      411d
ravendb-0                  ClusterIP      10.0.193.14    &lt;none&gt;           443/TCP,38888/TCP,161/TCP      411d
ravendb-1                  ClusterIP      10.0.156.73    &lt;none&gt;           443/TCP,38888/TCP,161/TCP      411d
ravendb-2                  ClusterIP      10.0.53.227    &lt;none&gt;           443/TCP,38888/TCP,161/TCP      411d
</code></pre>

<p>I finally figured out what I was missing. I added <code>kubernetes.io/ingress.class: haproxy</code> annotation and problem solved:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress  
metadata:
  name: ravendb
  namespace: default
  labels:
    app: ravendb
  annotations:
    ingress.kubernetes.io/ssl-passthrough: &quot;true&quot;
    kubernetes.io/ingress.class: haproxy
spec:
  rules:
  - host: a.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-0
          servicePort: 443
        path: /
  - host: tcp-a.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-0
          servicePort: 38888
        path: /
  - host: b.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-1
          servicePort: 443
        path: /
  - host: tcp-b.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-1
          servicePort: 38888
        path: /
  - host: c.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-2
          servicePort: 443
        path: /
  - host: tcp-c.raven.aedas-prev.inercya.com
    http:
      paths:
      - backend:
          serviceName: ravendb-2
          servicePort: 38888
        path: /
</code></pre>
<p>Now HAproxy ingress works as expected, reverse proxying external traffic to internal services.</p>
