Hi
I am trying to use traefik as a reverse proxy for mosquitto as a backend.
I created an entrypoint for mqtt in values.yaml
web:
port: 1883
expose: true
exposedPort: 8883
The service looks okay I can see the endpoints as the traefik port, traefik has a loadBalancer IP from metallb.
I created an IngressRouteTCP for my service:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: myservice-mqtt
spec:
entryPoints:
- mqtt
routes:
- match: HostSNI(`*`)
services:
- name: myservice-mqtt
port: 1883
This is the service I am using for it:
apiVersion: v1
kind: Service
metadata:
name: myservice-mqtt
spec:
ports:
- name: mqtt
port: 1883
targetPort: 1883
selector:
app: myservice
My problem is that I have several services and ingressRouteTCPs in my system. If the hostSNI is set to '*' how traefik will decide which is the right endpoint if a request is coming for it? My mqtt messages are unecrypted. If my approach is not good, how can I differentiate my services?
Thanks in advance