Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can do this in two ways,

  1. 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
languageyaml
  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. 

...