Versions Compared

Key

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

...

Here we will show the necessary steps for a zero-downtime upgrade of both the HiveMQ k8s operator as well as HiveMQ itself.

...

operator values file: 

Code Block
languagebash
monitoring:
  enabled: true
operator:
  admissionWebhooks:
    enabled: false
    failurePolicy: Fail
  deployCr: false
  logLevel: DEBUG
  1. Deploy Hivemq operator with 0.8.7

    Code Block
    languagebash
    helm upgrade --version 0.8.7 --install -f operator.yaml <release name> hivemq/hivemq-operator
  2. Apply Hivemq cluster with hivemq 4.6.2

    Code Block
    languagebash
    kubectl apply -f <hivemq cluster.yaml>
  3. Simply apply the new CRD using the following command (considering k8s version is 1.16+)
    Note: This step can be skipped if you are using BladeCenter.

    Code Block
    languagebash
    kubectl apply -f https://raw.githubusercontent.com/hivemq/helm-charts/prerelease-4.6.4/charts/hivemq-operator/crds/hivemq-cluster.yaml
  4. Scale operator to 0 so it doesn’t immediately reconcile. This will only remove the operator pod, but leave the HiveMQ nodes as remaining

    Code Block
    kubectl scale —replicas=0 deployment <operator name>
  5. Edit hivemq cluster yaml to update the hivemq version as 4.6.4

  6. Apply the changes

    Code Block
    Kubectl apply -f <hivemq cluster.yaml>
  7. check the pods status(no errors)

    Code Block
    kubectl get pods
  8. Update operaor operator version i.e 0.9.2 in cluster(operator config File)

  9. Run the following command for rolling upgrade

    Code Block
    helm upgrade --version 0.9.2 --install -f operator.yaml <release name> hivemq/hivemq-operator
    —version 0.9.2