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
| Variable | Default | Description |
|---|---|---|
GRPC_PORT | 9090 | TCP port for the scaler's gRPC server. Validated to be an integer in the range 1–65535. The server binds 0.0.0.0:<GRPC_PORT>. |
LOG_LEVEL | info | Structured-log level. Case-insensitive; must be one of debug, info, warn, error. Output is JSON via Go's slog. |
docker run -p 9090:9090 \
-e GRPC_PORT=9090 \
-e LOG_LEVEL=debug \
kubemq/kubemq-keda-scaler:1.0.0An 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
helm install kubemq-keda-scaler deploy/helm/kubemq-keda-scaler/helm install kubemq-keda-scaler deploy/helm/kubemq-keda-scaler/ \
--set env.logLevel=debug \
--set resources.requests.cpu=100mhelm 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=trueThe raw manifests under deploy/kubernetes/ are minimal and intended for quick testing; use the
Helm chart for production.
kubectl apply -f deploy/kubernetes/The KubeMQ broker must be reachable from the container network.
docker run -p 9090:9090 kubemq/kubemq-keda-scaler:1.0.0Running 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:nextThe 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.
Related
- ScaledObject metadata — per-trigger connection and tuning fields.
- gRPC RPCs — the RPC surface served on
GRPC_PORT, plus health checks.
Was this page helpful?