...
You can do this in two ways,
Expose the ports directly via the use of the K8s operator patch. (You can export these configurations from the full
values.yaml
in our helm-chart repository.)
Code Block | ||
---|---|---|
| ||
ports: - name: "mqtt" port: 1883 expose: true patch: - '[{"op":"add","path":"/spec/selector/hivemq.com~1node-offline","value":"false"},{"op":"add","path":"/metadata/annotations","value":{"service.spec.externalTrafficPolicy":"Local"}}]' # If you want Kubernetes to expose the MQTT port to external traffic - '[{"op":"add","path":"/spec/type","value":"LoadBalancer"}]' - name: "mqtt-tls" port: 8883 expose: true patch: - '[{"op":"add","path":"/spec/selector/hivemq.com~1node-offline","value":"false"},{"op":"add","path":"/metadata/annotations","value":{"service.spec.externalTrafficPolicy":"Local"}}]' # If you want Kubernetes to expose the MQTT port to external traffic - '[{"op":"add","path":"/spec/type","value":"LoadBalancer"}]' |
...
Your cluster name is the one you have used during HiveMQ deployment while installing the helm chart.Â
...