Home > database >  Vernemq port 1883 with haproxy-ingress and also SSL termination
Vernemq port 1883 with haproxy-ingress and also SSL termination

Time:10-10

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.

CodePudding user response:

create file haproxy-ingress-values.yaml with following content

controller:
  tcp:
    "1883": "default/vernemq:1883:::default/mqtt-tls"

default/vernemq:1883 is service of vernemq with port 1883 and default/mqtt-tls is tls secret for mqtt which you want terminate.

then use the following command to upgrade your haproxy-ingress

helm upgrade haproxy-ingress haproxy-ingress/haproxy-ingress --create-namespace --namespace ingress-controller --version 0.13.4 -f haproxy-ingress-values.yaml

just replace upgrade with install if fresh installing haproxy-ingress.

Then at last deploy the following ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: vernemq-ingress
  annotations:
    kubernetes.io/ingress.class: haproxy
    ingress.kubernetes.io/tcp-service-port: "1883"
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: vernemq
                port:
                  number: 1883
  • Related