<p>I'm trying to deploy vernemq on kubernetes and want to access it with subdomain with ssl but ssl should be terminated before request go to vernemq on port 1883.</p>

<p>create file <code>haproxy-ingress-values.yaml</code> with following content</p>
<pre><code>controller:
  tcp:
    &quot;1883&quot;: &quot;default/vernemq:1883:::default/mqtt-tls&quot;
</code></pre>
<p><code>default/vernemq:1883</code> is service of <code>vernemq</code> with port 1883 and <code>default/mqtt-tls</code> is tls secret for mqtt which you want terminate.</p>
<p>then use the following command to upgrade your <code>haproxy-ingress</code></p>
<pre><code>helm upgrade haproxy-ingress haproxy-ingress/haproxy-ingress --create-namespace --namespace ingress-controller --version 0.13.4 -f haproxy-ingress-values.yaml
</code></pre>
<p>just replace <code>upgrade</code> with <code>install</code> if fresh installing haproxy-ingress.</p>
<p>Then at last deploy the following ingress</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: vernemq-ingress
  annotations:
    kubernetes.io/ingress.class: haproxy
    ingress.kubernetes.io/tcp-service-port: &quot;1883&quot;
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: vernemq
                port:
                  number: 1883
</code></pre>
