Versions Compared

Key

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

How to use Kubernetes Secret to specify HiveMQ license with HiveMQ Operator.
HiveMQ requires a valid license as a file placed in the /opt/hivemq/license directory . There are 3 ways to add the license with HiveMQ Operator:within the HiveMQ container to operate properly. You can specify this license file using HiveMQ Operator in three different ways: as a raw value in the values.yaml file,

...

as a configMap in the values.yaml file,

...

or as a

...

Secret in the values.yaml file.

...

This article explains how to use Kubernetes Secret to specify a HiveMQ license with HiveMQ Operatorwill guide you through the process of using a Kubernetes Secret.

\uD83D\uDCD8 Instructions

  1. Edit If you don't have the values.yaml file to specify that the license file is contained in hivemq-license secret, which will be mounted to the for the HiveMQ Operator yet, you can retrieve it from the HiveMQ Helm repository and save it to a file named values.yaml using the following command:

    Code Block
    languagebash
    helm show values 'hivemq/hivemq-operator' > values.yaml
  2. Edit the values.yaml file to configure the mapping of the HiveMQ license Secret to mount it into the HiveMQ container directory /opt/hivemq/license. Find the hivemq section in the values.yaml file and add the following lines:

    Code Block
    languageyaml
    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
    ...
  3. If there is no namespace for the HiveMQ, then create one and switch the kubectl context to it

    Code Block
    languagebash
    kubectl create ns hivemq
    kubectl ns hivemq
  4. Create the secret with nave hivemq-license in the namespace hivemq from the license file hivemq-2023.lic
  5. Create a Kubernetes Secret with the name hivemq-license using the kubectl command. Make sure to place the license file, in this case, hivemq-2023.lic, in the same namespace where the HiveMQ Operator is running (replace 'hivemq-namespace' with your actual namespace):

    Code Block
    languagebash
    kubectl create secret generic 'hivemq-license' \
      --from-file 'hivemq-license.lic' \
      --namespace 'hivemq
    Install
    -namespace'
  6. Now, you can install HiveMQ with the specified license. Use the following helm upgrade command, providing a release name (e.g., 'hivemq-mine from release'), the Helm chart ('hivemq/hivemq-operator to '), the target namespace ('hivemq and use parameter values from the file '), and the values.yaml file you edited earlier:

    Code Block
    languagebash
    helm upgrade 'hivemq-minerelease' \
      --install 'hivemq/hivemq-operator' \
      --namespace 'hivemq' \
      --values 'values.yaml'

    HiveMQ will be installed with the license file from the Kubernetes Secret, ensuring that it operates with the appropriate licensing.

    That's it! You've successfully configured HiveMQ to use a license file from a Kubernetes Secret using HiveMQ Operator.

Filter by label (Content by label)
type
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
showSpacefalse
sortmodified
showSpacetypefalsepage
reversetrue
pageexcerptTyperich content
labelskb-how-to-article
cqllabel = "license" and type = "page" and space = "KB"labelskb-how-to-article