rabbitmq
by CloudPirates
A messaging broker that implements the Advanced Message Queuing Protocol (AMQP)
About this chart
RabbitMQ
A Helm chart for RabbitMQ - A messaging broker that implements the Advanced Message Queuing Protocol (AMQP). RabbitMQ is a reliable, feature-rich message broker that supports multiple messaging patterns and is widely used for building distributed systems, microservices communication, and event-driven architectures.
Prerequisites
- Kubernetes 1.24+
- Helm 3.2.0+
- PV provisioner support in the underlying infrastructure (if persistence is enabled)
Installing the Chart
To install the chart with the release name my-rabbitmq:
$ helm install my-rabbitmq oci://registry-1.docker.io/cloudpirates/rabbitmq
Or install directly from the local chart:
$ helm install my-rabbitmq ./charts/rabbitmq
The command deploys RabbitMQ on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation.
Upgrading the Chart
For HA setups the erlang-cookie is used to join nodes to the cluster. If no erlang-cookie is set, a random one is generated with each chart update and restarted pods wont be able to rejoin the cluster with the new erlang-cookie.
For existing installations this can be fixed after an update by getting the current erlang-cookie from the ENV-Vars, inside the still running old pods and replacing the newly generated erlang-cookie in the k8s secret with the old one.
Uninstalling the Chart
To uninstall/delete the my-rabbitmq deployment:
$ helm uninstall my-rabbitmq
The command removes all the Kubernetes components associated with the chart and deletes the release.
Important: By default, PersistentVolumeClaims (PVCs) are NOT deleted when you uninstall the chart. This is intentional to prevent accidental data loss. If you reinstall the chart with different passwords or Erlang cookies, you may encounter authentication issues because the old data persists.
Cleaning up PersistentVolumeClaims
To manually delete the PVCs after uninstalling:
$ kubectl delete pvc -l app.kubernetes.io/instance=my-rabbitmq
Alternatively, you can enable automatic PVC deletion by configuring the persistentVolumeClaimRetentionPolicy before installation:
persistentVolumeClaimRetentionPolicy:
enabled: true
whenDeleted: Delete # Automatically delete PVCs when StatefulSet is deleted
whenScaled: Delete # Automatically delete PVCs when scaling down
See the Persistent Volume Claim Retention Policy section for more details.
Security & Signature Verification
This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.
Public Key:
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----
To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:
cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/rabbitmq:<version>
Configuration
The following table lists the configurable parameters of the RabbitMQ chart and their default values.
Global parameters
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
Common parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | String to partially override rabbitmq.fullname | "" |
fullnameOverride | String to fully override rabbitmq.fullname | "" |
namespaceOverride | String to override the namespace for all resources | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Kubernetes cluster domain | cluster.local |
RabbitMQ image parameters
| Parameter | Description | Default |
|---|---|---|
image.registry | RabbitMQ image registry | docker.io |
image.repository | RabbitMQ image repository | rabbitmq |
image.tag | RabbitMQ image tag | "4.2.0-management@sha256:23676732c0b7bb978c0837c150492222d5b23ff079fc2025b537f4ce5c013d98" |
image.imagePullPolicy | RabbitMQ image pull policy | Always |
Deployment configuration
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of RabbitMQ replicas to deploy (clustering needs to be enabled to set more than 1 replicas) | 1 |
revisionHistoryLimit | Number of revisions to keep in history for rollback (set to 0 for unlimited) | 10 |
podManagementPolicy | StatefulSet pod management policy | OrderedReady |
terminationGracePeriodSeconds | Time for Kubernetes to wait for the pod to gracefully terminate | 30 |
StatefulSet & Pod metadata
| Parameter | Description | Default |
|---|---|---|
statefulsetLabels | Labels to attach to StatefulSet | {} |
podLabels | Labels to attach to pods | {} |
podAnnotations | Annotations to attach to pods | {} |
statefulsetAnnotations | Annotations for StatefulSet | {} |
RabbitMQ Definitions
| Parameter | Description | Default |
|---|---|---|
definitions.enabled | Enable loading of RabbitMQ definitions on startup. When true, definitions will be loaded at container boot. | false |
definitions.existingConfigMap | Name of an existing ConfigMap containing RabbitMQ definitions (e.g., created via kubectl create configmap rmq-defs --from-file=defs.json). | "" |
definitions.existingConfigMapKey | Key in the existing ConfigMap containing the RabbitMQ definitions JSON file. | defs.json |
defintions.existingSecret | Name of an existing Secret containing RabbitMQ definitions. | "" |
definitions.existingSecretKey | Key in the existing Secret containing the RabbitMQ definitions JSON file. | defs.json |
definitions.users | Array of RabbitMQ users to create. | [] |
definitions.vhosts | Array of RabbitMQ virtual hosts to create. | [] |
definitions.permissions | Array of RabbitMQ permissions to set per vhost. | [] |
definitions.queues | Array of RabbitMQ queues to create. | [] |
definitions.exchanges | Array of RabbitMQ exchanges to create. | [] |
definitions.bindings | Array of RabbitMQ bindings to create. | [] |
definitions.parameters | Array of RabbitMQ parameters to create. | [] |
definitions.global_parameters | Array of RabbitMQ global parameters to create. | [] |
definitions.topic_permissions | Array of RabbitMQ topic permissions to create. | [] |
definitions.policies | Array of RabbitMQ policies to create. | [] |
Automatic Configuration Reloading
The chart supports automatic reloading of definitions when the ConfigMap or Secret changes, without requiring a pod restart or Helm upgrade.
| Parameter | Description | Default |
|---|---|---|
definitions.autoReload.enabled | Enable sidecar container to watch for ConfigMap/Secret changes | false |
definitions.autoReload.image.registry | Container image registry for the config watcher sidecar | docker.io |
definitions.autoReload.image.repository | Container image repository for the config watcher sidecar | curlimages/curl |
definitions.autoReload.image.tag | Container image tag for the config watcher sidecar | 8.11.1 |
definitions.autoReload.image.pullPolicy | Container image pull policy for the config watcher sidecar | IfNotPresent |
definitions.autoReload.resources | Resource limits and requests for the config watcher sidecar | {} |
How it works:
When enabled, a lightweight sidecar container runs alongside RabbitMQ and:
- Monitors the definitions file for changes (using checksum comparison)
- Automatically reloads definitions via RabbitMQ Management API when changes are detected
- Checks for changes every 10 seconds
Example:
definitions:
enabled: true
existingConfigMap: my-rabbitmq-definitions
autoReload:
enabled: true
After deployment, you can update your ConfigMap:
kubectl edit configmap my-rabbitmq-definitions -n <namespace>
# The sidecar will automatically detect and reload the new configuration
Service configuration
| Parameter | Description | Default |
|---|---|---|
service.type | Kubernetes service type | ClusterIP |
service.amqpPort | RabbitMQ AMQP service port | 5672 |
service.managementPort | RabbitMQ management UI port | 15672 |
service.epmdPort | RabbitMQ EPMD port | 4369 |
service.distPort | RabbitMQ distribution port | 25672 |
service.annotations | Kubernetes service annotations | {} |
service.annotationsHeadless | Kubernetes service annotationsHeadless | 25672 |
service.trafficDistribution | Traffic distribution policy for the service | "" |
service.externalTrafficPolicy | External Traffic Policy for the service | Cluster |
service.allocateLoadBalancerNodePorts | Whether to allocate NodePorts for service type LoadBalancer | true |
RabbitMQ Authentication
| Parameter | Description | Default |
|---|---|---|
auth.enabled | Enable RabbitMQ authe |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartrabbitmq is pinned at v0.21.34 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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