rabbitmq

by HelmForge

Helm chartv1.8.2App 4.4.1Apache-2.0Verified publisher

RabbitMQ for Kubernetes with explicit single-node and cluster modes

About this chart

RabbitMQ

RabbitMQ for Kubernetes with explicit single-node and cluster modes, optional Management UI, optional TLS, optional metrics, and dedicated operational docs for each architecture.

Install

HTTPS repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install rabbitmq helmforge/rabbitmq -f values.yaml

OCI registry

helm install rabbitmq oci://ghcr.io/helmforgedev/helm/rabbitmq -f values.yaml

Supported architectures

ArchitectureWhen to useDocument
single-nodesimple environments, development, staging, and workloads without broker-node failover requirementsdocs/single-node.md
clusterproduction with multiple nodes, quorum queues, and broker redundancydocs/cluster.md

What this chart covers

  • explicit architecture selection through architecture
  • authentication with username, password, and Erlang cookie
  • existingSecret for credentials managed outside the chart
  • transparent rabbitmq.conf and enabled_plugins modeling
  • optional Management UI
  • optional TLS for AMQP and Management UI
  • optional metrics through the native RabbitMQ Prometheus plugin
  • optional ServiceMonitor
  • optional PodDisruptionBudget
  • Ingress support for the Management UI with configurable ingressClassName
  • Gateway API HTTPRoute support for the Management UI
  • dual-stack Service fields through service.ipFamilyPolicy and service.ipFamilies
  • External Secrets Operator support for RabbitMQ credentials
  • official Alpine RabbitMQ image by default; plugins are controlled by chart values

How to choose the architecture

  • use single-node when operational simplicity matters more than broker redundancy
  • use cluster when queues must survive node loss and the application already handles multi-broker reconnect correctly

Recommended reading before installation:

  • Single Node
  • Cluster

Official product references

Operational direction

  • for production, the recommended mode is cluster with queueDefaults.type=quorum
  • use single-node only when broker-level HA is not a requirement
  • do not treat a RabbitMQ cluster as a substitute for good queue design, routing, or consumer reconnect behavior

Quick start

Minimal example:

architecture: single-node

auth:
  existingSecret: rabbitmq-auth

singleNode:
  persistence:
    enabled: true
    size: 8Gi

Cluster example:

architecture: cluster

auth:
  existingSecret: rabbitmq-auth

queueDefaults:
  type: quorum

cluster:
  replicaCount: 3
  persistence:
    enabled: true
    size: 20Gi

metrics:
  enabled: true
  serviceMonitor:
    enabled: true

Management UI ingress example:

management:
  ingress:
    enabled: true
    ingressClassName: traefik
    hosts:
      - host: rabbitmq.example.com
        paths:
          - path: /
            pathType: Prefix

Management UI Gateway API example:

management:
  enabled: true
  gateway:
    enabled: true
    parentRefs:
      - name: public
        namespace: gateway-system
    hostnames:
      - rabbitmq.example.com

External Secrets example:

auth:
  existingSecret: rabbitmq-credentials

externalSecrets:
  enabled: true
  secretStoreRef:
    name: platform-secrets
    kind: ClusterSecretStore
  data:
    - secretKey: rabbitmq-username
      remoteRef:
        key: rabbitmq/auth
        property: username
    - secretKey: rabbitmq-password
      remoteRef:
        key: rabbitmq/auth
        property: password
    - secretKey: rabbitmq-erlang-cookie
      remoteRef:
        key: rabbitmq/auth
        property: erlang-cookie

Best practices

Security

  • use auth.existingSecret in production
  • keep the Erlang cookie stable across restarts and upgrades
  • enable TLS when clients connect outside a trusted internal network boundary
  • restrict Management UI exposure
  • the default pod runs as UID 100 and GID 101 with RuntimeDefault seccomp, privilege escalation disabled, all Linux capabilities dropped, and a read-only root filesystem
  • only /var/lib/rabbitmq and /tmp are writable through explicit volumes
  • a non-root init container restores the Erlang cookie to owner-only mode after Kubernetes applies the volume filesystem group, including on legacy PVCs
  • the ServiceAccount token is not mounted because RabbitMQ 4.1 and later peer discovery uses StatefulSet ordinals instead of querying the Kubernetes API

Upgrades and credential retention

The chart reuses the username, password, and Erlang cookie from its existing managed Secret during upgrades. This applies to both --reset-values and --reuse-values, preventing the Secret from drifting away from credentials stored in the persistent RabbitMQ database.

Security defaults are merged by the workload template, so they also apply when --reuse-values carries forward the previous chart's empty security-context maps. Explicit security-context keys and an explicit automountServiceAccountToken value continue to override chart defaults.

Changing auth.username, auth.password, or auth.erlangCookie on an existing release does not rotate live broker credentials. Perform rotation with RabbitMQ administration tooling first, then move the synchronized credentials to an existing Secret or External Secrets provider.

The default official image and earlier public chart versions use UID 100 and GID 101, which is the tested in-place upgrade path. Before upgrading a release that used a custom image or custom process identity, inspect the existing cookie ownership and keep the pod identity aligned:

kubectl exec -n <namespace> <rabbitmq-pod> -- stat -c '%u:%g %a' /var/lib/rabbitmq/.erlang.cookie

Set podSecurityContext.runAsUser, runAsGroup, and fsGroup to that image's numeric identity before the upgrade. The non-root init container can then restore mode 0600. To migrate the PVC to UID 100, first use an explicitly authorized one-time maintenance pod to change ownership while RabbitMQ is stopped; the hardened chart intentionally does not run a root init container.

Queues and topology

  • in production, prefer quorum queues over mirrored classic queues
  • use cluster only when the application truly needs a multi-node topology
  • validate client reconnect behavior before promoting the topology to production

Scheduling

  • in cluster, spread pods across nodes or zones
  • enable pdb.enabled=true for production clusters
  • keep replicaCount >= 3 for the operational cluster baseline

Observability

  • enable metrics.enabled=true in monitored environments
  • use metrics.serviceMonitor.enabled=true with Prometheus Operator
  • monitor memory, disk, connections, queues, consumers, and node-local alarms

Runtime efficiency

  • the default image is docker.io/library/rabbitmq:4.4.1-alpine; it contains the management, Prometheus, and Kubernetes peer-discovery plugins, and the chart enables only the plugins requested by values
  • RabbitMQ 4.4.1 fixes exchange binding cleanup, quorum reconciliation, classic queue recovery, AMQP 1.0 validation and credential expiry
  • management.referrerPolicy=no-referrer enables the upstream Referrer-Policy support with a privacy-preserving default; set it to "" to defer to the browser default
  • runtime.disableSchedulerBusyWait=true is enabled by default to reduce idle CPU from Erlang scheduler spin-wait in containers
  • default Kubernetes probes use lightweight TCP checks against the active AMQP listener instead of recurring rabbitmq-diagnostics commands
  • use runtime.additionalErlArgs for extra Erlang VM flags and reserve extraEnv for explicit upstream environment variables or full overrides

Main values

ParameterDescriptionDefault
architecturesingle-node or clustersingle-node
image.repositoryRabbitMQ image repositorydocker.io/library/rabbitmq
image.tagRabbitMQ image tag4.4.1-alpine
auth.usernameApplication usernameuser
auth.passwordApplication password""
auth.erlangCookieErlang cookie""
auth.existingSecretExisting secret for credentials""
automountServiceAccountTokenMount a Kubernetes API token in the podfalse
podSecurityContextPod identity, filesystem group, and seccomp defaultsUID 100, GID/fsGroup 101, RuntimeDefault
securityContextContainer hardening defaultsnon-root, read-only root, no escalation, drop ALL
queueDefaults.typequorum or classicquorum
management.enabledEnable management plugin/UItrue
management.referrerPolicyManagement UI Referrer-Policy header; empty uses browser defaultno-referrer
management.ingress.enabledEnable management ingressfalse
management.ingress.ingressClassNameIngress class for the Management UItraefik
tls.enabledEnable TLS listenersfalse
singleNode.persistence.enabledEnable PVC for single nodetrue
cluster.replicaCountNumber of cluster nodes3
cluster.partitionHandlingCluster partition handlingpause_minority
metrics.enabledEnable RabbitMQ Prometheus pluginfalse
metrics.serviceMonitor.enabledEnable ServiceMonitorfalse
runtime.disableSchedulerBusyWaitDisable Erlang scheduler busy-wait for lower idle CPUtrue
runtime.additionalErlArgsAdditional Erlang VM arguments appended to chart defaults""
startupProbe.enabledEnable TCP startup probetrue
livenessProbe.enabledEnable TCP liveness probetrue
readinessProbe.enabledEnable TCP readiness probetrue
pdb.enabledEnable PodDisruptionBudgetfalse
service.ipFamilyPolicyService IP family policy for dual-stack clusters""
management.gateway.enabledRender Gateway API HTTPRoute for the Management UIfalse
externalSecrets.enabledRender ExternalSecret for credentialsfalse

CI scenarios

The ci/ scenarios validate the main chart behaviors:

  • single-node.yaml
  • cluster.yaml
  • secure.yaml
  • existing-secret.yaml
  • metrics.yaml
  • dual-stack.yaml
  • gateway-api.yaml
  • external-secrets.yaml

Examples

See examples/:

  • single-node.yaml
  • cluster-ha.yaml
  • management-tls.yaml
  • gateway-api.yaml
  • external-secrets.yaml

Important notes

  • cluster is not magical HA abstraction; queues, consumers, and reconnect behavior remain application and operations concerns
  • quorum queues are the recommended production direction in this chart
  • this chart does not attempt to orchestrate federation, shovel, or advanced policy management in v1
  • management.ingress.ingressClassName can be set to traefik, nginx, or any ingress class available in the target cluster
  • externalSecrets.enabled=true requires auth.existingSecret so the chart does not generate credentials that drift from the operator-managed Secret

Security Scan: rabbitmq

FrameworkScore
MITRE + NSA + SOC274.24%

Security posture acceptable.

Deploy rabbitmq with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rabbitmq on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrabbitmq is pinned at v1.8.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply