KubeMQ
IntegrationsKEDAReference

Environment Variables

The two environment variables the KubeMQ KEDA scaler reads at startup, plus its installation methods and how to run a local KubeMQ broker.

The scaler binary reads exactly two environment variables at startup. Both are validated by LoadConfig; an invalid value aborts the process with a non-zero exit code rather than starting with a silent fallback. The per-ScaledObject connection settings (broker address, queue, TLS, auth) are not environment variables — they live in trigger metadata.

Variables

VariableDefaultDescription
GRPC_PORT9090TCP port for the scaler's gRPC server. Validated to be an integer in the range 165535. The server binds 0.0.0.0:<GRPC_PORT>.
LOG_LEVELinfoStructured-log level. Case-insensitive; must be one of debug, info, warn, error. Output is JSON via Go's slog.
Run with custom values
docker run -p 9090:9090 \
  -e GRPC_PORT=9090 \
  -e LOG_LEVEL=debug \
  kubemq/kubemq-keda-scaler:1.0.0

An out-of-range GRPC_PORT (e.g. 0 or 70000) or an unrecognized LOG_LEVEL causes the scaler to log an error and exit immediately. There is no fallback to the default in these cases.

Under Helm, these map to env.grpcPort and env.logLevel — see the Helm values table.

Installation methods

Install
helm install kubemq-keda-scaler deploy/helm/kubemq-keda-scaler/
Install with overrides
helm install kubemq-keda-scaler deploy/helm/kubemq-keda-scaler/ \
  --set env.logLevel=debug \
  --set resources.requests.cpu=100m
Install with a TLS CA mount
helm install kubemq-keda-scaler deploy/helm/kubemq-keda-scaler/ \
  --set extraVolumes[0].name=certs \
  --set extraVolumes[0].secret.secretName=kubemq-ca-cert \
  --set extraVolumeMounts[0].name=certs \
  --set extraVolumeMounts[0].mountPath=/certs \
  --set extraVolumeMounts[0].readOnly=true

The raw manifests under deploy/kubernetes/ are minimal and intended for quick testing; use the Helm chart for production.

Apply raw manifests
kubectl apply -f deploy/kubernetes/

The KubeMQ broker must be reachable from the container network.

Run the scaler container
docker run -p 9090:9090 kubemq/kubemq-keda-scaler:1.0.0

Running a local KubeMQ broker

To exercise the example manifests against a local broker, run KubeMQ exposing the gRPC port (50000) and the shared HTTP port (9090), and point kubemqAddress at it:

docker run -d \  --name kubemq \  -p 50000:50000 \  -p 9090:9090 \  -e KUBEMQ_TOKEN=YOUR_LICENSE_KEY \  europe-docker.pkg.dev/kubemq/images/kubemq:next

The scaler reads the queue's Waiting count over the standard KubeMQ gRPC API (port 50000) — the same API your queue consumers use; it does not require any connector to be enabled on the broker. The broker's HTTP port 9090 is its shared port and is unrelated to the scaler's own gRPC port, which also defaults to 9090 but listens inside the scaler pod.

Was this page helpful?

On this page