Setup MQTT / CoAP Load Balancer on Rancher 2.x On-Premise Installation

Hi, Has anybody figured out how to setup a Load Balancer for the MQTT and CoAP protocols on Rancher 2.x. The default L7 Ingress load balancer right now only supports http and https. However, we are deploying Rancher in premise and so do not have the L4 load balancer provided by cloud providers. Any ideas?

According to the NGINX documentation, load balancing MQTT and CoAP is supported.
Check out the below slide.
So why is Rancher Ingress load balancer not able to support it.

@weekaung had you found a solution? I have exactly the same problem (want to expose MQTT) :frowning:

No, just shelved the project. Is Rancher listening? If you have a roadmap in the future to enable MQTT support in the load balancer, let us know. Thanks.

1 Like

We deploy the standard nginx ingress controller and don’t really get involved in what features it does or doesn’t support. It is its own open-source project with its own agenda.

There are other ingress options, as well as layer 4 balancing options that work on-premise (MetalLB)

@weekaung I managed to make it work by applying a ConfgMap to the nginx system ingress. This exposed correctly the port and allowed me to connect with MQTT.
I hope this is a stable/good solution.

More info here.

Hope this is useful also for you.