KubeMQ
ConfigureKubernetes

Kubernetes (Helm)

Configure a KubeMQ cluster on Kubernetes — cluster-values.yaml, the KubemqCluster resource, interfaces, settings changes, and HA.

Install KubeMQ first with Install on Kubernetes. This page changes the settings of a cluster you installed with Helm. For a cluster kmq installed, see Apply a settings change.

On Kubernetes, KubeMQ runs through the operator. You describe the server with a KubemqCluster custom resource, the operator reconciles it into a StatefulSet, Services, and configuration, and the kubemq-next Helm chart renders that resource from your cluster-values.yaml. Because the chart writes values straight into the CR, a Helm value path equals the KubemqCluster spec.* path with the leading spec. removed (spec.grpc.port → grpc.port).

This guide is the single source of truth for complete, runnable Helm and CRD configurations. The Configuration overview and the reference pages show minimal single-setting snippets and link here.

Configure with cluster-values.yaml

For anything beyond the license, add settings to the cluster-values.yaml you created in Install on Kubernetes. The license is set by Install on Kubernetes; its fields are listed in License. Each value maps 1:1 to a KubemqCluster spec.* field — the chart renders your values verbatim into the CR spec, so there is no separate Helm schema to learn.

Add each key once. Helm does not merge a repeated key: a second api: block replaces the first and drops your sign-in settings. To change a key the file already has (replicas, volume, api, licenseKeySecretRef, env), edit it in place instead of adding a second copy.

cluster-values.yaml (settings to add)
# Example keys — add only the ones you need. Each maps to spec.<key>.
# To publish an interface outside the cluster, see Expose interfaces below.

# REST is on by default; MCP / A2A / CloudEvents ride the REST HTTP port
# (disabled: false is the default — shown here only to be explicit)
rest:
  disabled: false
  port: 9090
  expose: ClusterIP

# Store limits and retention — enforced on the `legacy` engine only (see callout below)
store:
  messagesRetentionMinutes: 1440
  maxChannels: 0

# Pod resources — development-sized; size them for your load
resources:
  requestsCpu: 250m
  requestsMemory: 512Mi
  limitsCpu: "2"
  limitsMemory: 2Gi

Changing resources restarts the servers one at a time. Size them for your load with Resources.

store.messagesRetentionMinutes and the other store.max* limits are enforced by the legacy engine only — and a new cluster on a clean store comes up on next. So the 1440 above does nothing on a default install: native Events Store and Queues channels have no age, size, or count cap and grow until the disk does. Size by spec.volume.size, or use Kafka topic channels where age eviction matters. See Native retention scope.

Apply the file with the commands in Apply a settings change.

The same settings as a KubemqCluster resource, for a cluster you manage yourself with kubectl apply -f instead of Helm. Do not apply it to a cluster that Helm or kmq installed: they overwrite the resource on their next update. It reads the license from the Secret messaging-license that the Helm path of Install on Kubernetes creates.

kubemqcluster.yaml
apiVersion: next.kubemq.io/v1
kind: KubemqCluster
metadata:
  name: messaging
  namespace: kubemq
spec:
  licenseKeySecretRef:
    name: messaging-license
    key: licenseKey
  replicas: 3
  volume:
    size: 20Gi
    storageClass: YOUR_STORAGE_CLASS
  rest:
    disabled: false
    port: 9090
    expose: ClusterIP
  api:
    port: 8080
    expose: ClusterIP
    auth:
      enable: true
      adminUsername: admin
  store:
    messagesRetentionMinutes: 1440
    maxChannels: 0
  resources:
    requestsCpu: 250m
    requestsMemory: 512Mi
    limitsCpu: "2"
    limitsMemory: 2Gi

Replace:

  • YOUR_STORAGE_CLASS — a storage class in your cluster, from kubectl get storageclass.

REST is enabled by default on the chart. The chart ships rest.disabled: false (spec.rest.disabled: false), so REST — and the MCP, A2A, and CloudEvents connectors that ride the REST HTTP port — are reachable out of the box. disabled is an opt-out boolean: omit the key entirely to leave REST on; set rest.disabled: true only to turn REST off, which also takes MCP, A2A, and CloudEvents offline.

On Kubernetes, .port moves everything together. For grpc, rest, and api, setting spec.<iface>.port makes the operator emit the matching listener env var (CONNECTORS_GRPC_PORT / CONNECTORS_REST_PORT / API_PORT) and set the Kubernetes Service port/targetPort and the container port — the in-pod listener and the Service port move as one. This matches Docker, where the same *_PORT setting moves the actual listener (which you then publish with -p) — see the Docker guide.

Apply a settings change

These commands are for clusters installed with Helm. If kmq installed your cluster, do not run them: they replace the settings kmq applied, including the license and TLS settings, and the servers can stop. Contact support to change settings on a cluster kmq installed.

Find the chart version the cluster runs:

Terminal
helm list --kube-context YOUR_KUBE_CONTEXT -n kubemq

Replace:

  • YOUR_KUBE_CONTEXT — the kubectl context of your cluster, from kubectl config get-contexts.

You should see a row named messaging whose CHART column reads kubemq-next- followed by the chart version.

Apply cluster-values.yaml at that same version:

Terminal
helm upgrade --install messaging kubemq-next/kubemq-next \
  --kube-context YOUR_KUBE_CONTEXT \
  -n kubemq \
  --version YOUR_VERSION \
  -f cluster-values.yaml \
  --wait

Replace:

  • YOUR_VERSION — the version after kubemq-next- in the CHART column above.

You should see STATUS: deployed and a REVISION one higher than before.

Passing the version you already run changes settings only. To move to the latest release, follow Upgrade KubeMQ instead, which also updates the CRDs. Do not use --reuse-values.

Wait for the cluster to be ready with the new settings:

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

You should see kubemqcluster.next.kubemq.io/messaging condition met.

Cluster size

A cluster runs 3 or more servers; see Requirements and supported setups. Use an odd count such as 3, 5, or 7, and choose it before you install: the count cannot change once the cluster is established (see High availability). For local development and testing, use the single-node Docker guide.

Expose interfaces

Set expose under the grpc: key (add the key if your file does not have it yet). Messaging authentication is off by default, so turn it on before you publish gRPC outside the cluster; see Security.

cluster-values.yaml (the grpc key)
grpc:
  expose: LoadBalancer    # ClusterIP | NodePort | LoadBalancer

To publish the management API, add expose (and nodePort) under the api: key your file already has, keeping its auth settings. Beyond the cluster, serve it over TLS; see Use your own management certificate.

cluster-values.yaml (the existing api key)
api:
  expose: NodePort
  nodePort: 32080         # only used with NodePort
  auth:
    enable: true
    adminUsername: admin
  • ClusterIP — reachable only inside the cluster (the default for internal-only interfaces).
  • NodePort — published on every node at nodePort; useful for direct access without a cloud load balancer.
  • LoadBalancer — provisions an external load balancer (cloud environments).

nodePort applies only when expose: NodePort. On Docker there is no Service — publish ports with -p instead (see the Docker guide).

Zero-config Kafka

The Kafka connector is on by default — a fresh cluster needs no kafka: block at all, and no separate engine setting to manage.

With the store empty and store.engine left unset, the server auto-selects the next storage engine (store.engine: next) at first boot — see Storage Engines → Zero-config engine selection for the full selection rules. To run without Kafka, turn it off explicitly:

cluster-values.yaml (settings to add)
kafka:
  enabled: false

Every default install runs Kafka with replicas: 3, so Kafka producers should use acks>=1 for durable writes. The next storage engine acknowledges a publish only after it's quorum-replicated across raft peers, so an acks=0 producer won't see a stalled or leaderless partition.

External reachability needs spec.kafka.expose plus an advertised host/port pair — see Connectors → Kafka for the full listener/TLS/SAN details.

Configure by domain

Every server setting — with its type, default, valid values, and both per-target columns — lives in the domain reference pages.

Verify

Confirm the operator has reconciled the cluster and the pods are ready.

Check the KubemqCluster resource and its status:

Terminal
kubectl --context YOUR_KUBE_CONTEXT -n kubemq get kubemqclusters.next.kubemq.io

Replace:

  • YOUR_KUBE_CONTEXT — the kubectl context of your cluster, from kubectl config get-contexts.

Inspect the full status, including the reconcile phase and any conditions:

Terminal
kubectl --context YOUR_KUBE_CONTEXT -n kubemq describe kubemqclusters.next.kubemq.io messaging

Confirm the server pods are running:

Terminal
kubectl --context YOUR_KUBE_CONTEXT -n kubemq get pods

You should see messaging-0, messaging-1 and messaging-2 with status Running.

To reach the dashboard, open a tunnel to the first server, then open http://127.0.0.1:18080 (https://127.0.0.1:18080 on a cluster kmq installed):

Terminal
kubectl --context YOUR_KUBE_CONTEXT -n kubemq port-forward pod/messaging-0 18080:8080

Was this page helpful?

On this page