Setting Up HiveMQ License for Your HiveMQ Cluster using HiveMQ Platform Operator

Setting Up HiveMQ License for Your HiveMQ Cluster using HiveMQ Platform Operator

This guide provides step-by-step instructions on how to set up one or more HiveMQ licenses (broker and enterprise extensions) for your HiveMQ cluster when you deploy it with the HiveMQ Platform Operator and the hivemq/hivemq-platform Helm chart.

Prerequisites

  • Running Kubernetes cluster

  • Helm 3.x

  • HiveMQ Platform Operator installed

  • Valid HiveMQ license files:

    • HiveMQ broker license (.lic)

    • Optional enterprise extension licenses (.elic), for example:

      • HiveMQ Enterprise Extension for Kafka

      • HiveMQ Enterprise Security Extension

    • Optional HiveMQ Data Hub license (.plic)

 Instructions

Here are the steps to follow:

  1. Install the HiveMQ Platform Operator: (If you have not already installed the operator:)

    helm install platform-op hivemq/hivemq-platform-operator
  2. How license handling works in the Platform Helm chart

The hivemq/hivemq-platform Helm chart always ends up mounting license data into:

/opt/hivemq/license

inside each HiveMQ broker pod.

All supported approaches below (Options 1–3) converge on the same end state:

  • All license files (broker + extensions + Data Hub) are available under /opt/hivemq/license.

  • HiveMQ automatically detects and uses the correct licenses at startup.

You can choose the option that best fits your workflow (GitOps, external secret management, or manual Helm usage).

Option 1 – One Kubernetes Secret with all license files (recommended when you have several licenses)

In this option, you put all license files into a single Kubernetes Secret and tell the Helm chart to reuse that Secret. The chart mounts the Secret into /opt/hivemq/license, and HiveMQ automatically picks the right licenses.

Step 1: Create a Secret with all license files

From the directory where your extracted licenses are stored (for example ./licenses/):

kubectl create secret generic hivemq-license \ --from-file=hivemq-broker.lic=./licenses/hivemq-broker.lic \ --from-file=hivemq-kafka-extension.elic=./licenses/hivemq-kafka-extension.elic \ --namespace <namespace>

Add further --from-file=... entries for additional licenses, for example:

  • Other Enterprise Extensions (.elic)

  • HiveMQ Data Hub (.plic)

Step 2: Point the Helm chart to this Secret

In your HiveMQ platform values file (for example, platform-values.yaml):

license: create: false # reuse existing Secret name: "hivemq-license" # must match the Secret name

Deploy or upgrade your HiveMQ Platform:

helm upgrade --install <release-name> hivemq/hivemq-platform \ --namespace <namespace> \ --values platform-values.yaml \ --wait --timeout 10m

The chart mounts this Secret into /opt/hivemq/license. All these license files are visible there and used by HiveMQ.

Option 2 – All licenses defined in values.yaml (base64 data)

In this option, you describe all licenses under the license section of your values.yaml. The chart creates the Secret for you and mounts it into /opt/hivemq/license.

Example structure (pseudo base64 values)

license: create: true # Broker license (.lic) data: "<base64-of-hivemq-broker.lic>" # Enterprise Extensions (.elic) extensions: hivemq-kafka-extension-license: data: "<base64-of-hivemq-kafka-extension.elic>" hivemq-security-extension-license: data: "<base64-of-hivemq-security-extension.elic>" # Data Hub (.plic), if used dataHub: full: data: "<base64-of-hivemq-data-hub.plic>"

Generate base64 values

For each license file, run:

cat path/to/your/hivemq-license.lic | base64

Paste the output into the corresponding data: field in your values.yaml. Repeat for each .lic, .elic, and .plic file.

When you deploy with:

helm upgrade --install <release-name> hivemq/hivemq-platform \ --namespace <namespace> \ --values platform-values.yaml \ --wait --timeout 10m

the chart creates a single license Secret and mounts it into /opt/hivemq/license.

Option 3 – Inject license files via Helm --set-file

If you do not want to store base64 license data in values.yaml, you can point Helm directly to the license files on the command line using --set-file.

Example:

helm upgrade --install <release-name> hivemq/hivemq-platform \ --namespace <namespace> \ --values platform-values.yaml \ --set license.create=true \ --set-file license.overrideLicense=./licenses/hivemq-broker.lic \ --set-file license.extensions.kafka.overrideLicense=./licenses/hivemq-kafka-extension.elic \ --wait --timeout 10m

You can add more flags of the form:

--set-file license.extensions.<name>.overrideLicense=./licenses/<extension-license-file>

for additional Enterprise Extensions, and similar entries under license.dataHub for Data Hub licenses if needed.

Again, the result is a license Secret that is mounted into /opt/hivemq/license in the broker pod.

Summary

  • Option 1: Reuse a pre-created Secret that contains all license files (recommended if you manage many licenses centrally).

  • Option 2: Inline all license data as base64 in values.yaml; the chart creates the Secret.

  • Option 3: Provide license files at deploy time via --set-file on the Helm command.

All options lead to the same runtime state: all license files are available under /opt/hivemq/license in the HiveMQ broker container, and HiveMQ automatically activates the corresponding features.

 Related articles