KubeMQ
DeployUpgrade and migrate

Upgrade KubeMQ

Upgrade KubeMQ to the latest release with kmq, Docker, Compose or Helm, check what you run, roll back safely and leave the old combined chart.

This page upgrades a running KubeMQ installation to the latest release. When you finish, kmq license shows the new release in its VERSION column, the license is still active, and a test message round-trips. Time: about 15 minutes.

Commands use the default names kubemq-operator, messaging, kubemq and the namespace kubemq; use your own if they differ.

These commands are for bash on macOS and Linux. On Windows, run them in WSL (Windows Subsystem for Linux), or use the kmq tab of Try KubeMQ, which runs natively on Windows.

Before you start

  1. Update kmq, the KubeMQ command-line tool:

    kmq update

    You should see:

    Output
    HARNESS_OUTPUT_PENDING

    If kmq reports unknown command "update", re-run the installer from Try KubeMQ.

  2. Find what you run: the VERSION column of kmq license (on Kubernetes, kmq license --kube-context YOUR_KUBE_CONTEXT). For Helm, list the releases:

    helm list --kube-context YOUR_KUBE_CONTEXT -A

    Replace: YOUR_KUBE_CONTEXT — your cluster's kubectl context; kubectl config get-contexts lists them.

    If one Helm release holds both the operator and the cluster, go to Move from the old combined chart release first. Artifact names: Requirements and supported setups.

  3. Read Release notes for each release after yours, especially "Before you upgrade".

  4. Back up: on one server, steps 1 to 4 of Back up and restore. For Kubernetes, contact support before relying on a restore.

Steps

Upgrade one server

Upgrade the server

kmq deploy update --installation kubemq --deadline 10m

You should see:

Output
HARNESS_OUTPUT_PENDING

The kubemq-data volume and your data stay.

Pull the latest image

docker pull --platform linux/amd64 europe-docker.pkg.dev/kubemq/images/kubemq-next:latest

You should see:

Output
HARNESS_OUTPUT_PENDING

Remove the old container

docker stop kubemq
docker rm kubemq

Check that the volume stays:

docker volume ls --filter name=kubemq-data --format '{{.Name}}'

You should see:

Output
HARNESS_OUTPUT_PENDING

Start the server again

In kubemq-private, rerun your install command; from Install with Docker, that is:

docker run -d \  --pull always \  --platform linux/amd64 \  --name kubemq \  --hostname kubemq \  -p 127.0.0.1:50000:50000 \  -p 127.0.0.1:9090:9090 \  -p 127.0.0.1:8080:8080 \  -p 127.0.0.1:9092:9092 \  --env-file kubemq-license.env \  -e STORE_ENGINE=next \  -e STORE_NEXT_ACK_POLICY=strict \  -e STORE_STORE_PATH=/kubemq/store \  -e API_BIND_ADDRESS=0.0.0.0 \  -v kubemq-data:/kubemq/store \  europe-docker.pkg.dev/kubemq/images/kubemq-next:latest

Check that the server is running:

docker ps --filter name=kubemq --format '{{.Names}}: {{.Status}}'

You should see:

Output
HARNESS_OUTPUT_PENDING

With Docker Compose, run docker compose pull, then docker compose up -d. With Podman, use podman in place of docker.

Then check the license:

kmq license

You should see:

Output
HARNESS_OUTPUT_PENDING

VERSION shows the new release; STATE is unchanged. If kmq cannot connect, the server is still starting: wait a few seconds and run it again. Sign in at http://localhost:8080: your channels are still there.

Upgrade a Kubernetes cluster

Upgrade the cluster

kmq deploy update --installation messaging --deadline 20m

You should see:

Output
HARNESS_OUTPUT_PENDING

kmq applies the custom resource definitions first, then upgrades the operator and cluster.

Data loss: do not use --reuse-values

--reuse-values keeps the old chart's images: the servers stay on the old release, and a later rollback can meet a store it cannot read.

Update the chart list

helm repo update kubemq-next

You should see:

Output
HARNESS_OUTPUT_PENDING

Update the custom resource definitions

Helm never upgrades them itself.

helm show crds kubemq-next/kubemq-next | kubectl --context YOUR_KUBE_CONTEXT apply --server-side --force-conflicts -f -

You should see:

Output
HARNESS_OUTPUT_PENDING

Upgrade the operator

helm upgrade --install kubemq-operator kubemq-next/kubemq-next --kube-context YOUR_KUBE_CONTEXT -n kubemq \
  --set operator.enabled=true --set cluster.enabled=false --wait

You should see:

Output
HARNESS_OUTPUT_PENDING

The servers then restart one at a time on the release the operator sets.

Upgrade the cluster

In kubemq-private, where cluster-values.yaml lives:

helm upgrade --install messaging kubemq-next/kubemq-next --kube-context YOUR_KUBE_CONTEXT -n kubemq -f cluster-values.yaml

You should see:

Output
HARNESS_OUTPUT_PENDING

Then wait until every server is ready:

kubectl --context YOUR_KUBE_CONTEXT -n kubemq wait --for=condition=Ready kubemqclusters.next.kubemq.io/messaging --timeout=10m

Replace: YOUR_KUBE_CONTEXT — your cluster's kubectl context; kubectl config get-contexts lists them.

You should see:

Output
HARNESS_OUTPUT_PENDING

Check the license:

kmq license --kube-context YOUR_KUBE_CONTEXT

You should see:

Output
HARNESS_OUTPUT_PENDING

Then send a test message as in Install on Kubernetes.

Roll back

A store written by a newer release may not be readable by an older one. Roll back only when the release notes say the upgrade is reversible: install the previous release as "Pin a version" shows, and on Kubernetes also run helm rollback for the operator. Otherwise, restore your backup as in Back up and restore; for Kubernetes, contact support first.

Move from the old combined chart release

Older charts put the operator and the cluster in one Helm release. The current chart refuses a release that enables both: operator and cluster must use independent releases. Contact support before upgrading a release that contains both the operator and the cluster.

If something goes wrong

  • The servers still run the old release. Run the wait command again. If they stay old, repeat the Helm steps without --reuse-values.
  • A server restarts with a storage error in its log. Restore your backup and check the release notes.
  • A licensing message in the log. Look up the anchor it prints in Troubleshooting.

Next steps

Was this page helpful?

On this page