Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

How to use Kubernetes Secret to specify HiveMQ license with HiveMQ Operator.
HiveMQ requires a license as a file in /opt/hivemq/license directory. There are 3 ways to add the license with HiveMQ Operator:

  1. as a raw value in the values.yaml file,

  2. as a configMap in the values.yaml file,

  3. as a secret in the values.yaml file.

This article explains how to use Kubernetes Secret to specify a HiveMQ license with HiveMQ Operator.

\uD83D\uDCD8 Instructions

  1. Edit the values.yaml file to specify that the license file is contained in hivemq-license secret, which will be mounted to the directory /opt/hivemq/license

    hivemq:
    ...
      secrets: 
      # Secrets to mount to the HiveMQ pods. These can be mounted to existing directories without shadowing the folder contents as well.
      - name: hivemq-license
        path: /opt/hivemq/license
    ...
  2. If there is no namespace for the HiveMQ, then create one and switch the kubectl context to it

    kubectl create namespace 'hivemq'
    kubectl config set-context --current --namespace='hivemq'
  3. Create the secret with nave hivemq-license in the namespace hivemq from the license file hivemq-2023.lic

    kubectl create secret generic 'hivemq-license' \
      --from-file 'hivemq-license.lic' \
      --namespace 'hivemq'
  4. Install HiveMQ with the release name hivemq-mine from the Helm chart hivemq-operator to the namespace hivemq and use parameter values from the file values.yaml

    helm upgrade 'hivemq-release' \
      --install 'hivemq/hivemq-operator' \
      --namespace 'hivemq' \
      --values 'values.yaml'

  • No labels