rabbitmq
by magefleet
A Helm chart for RabbitMQ 4.1
About this chart
RabbitMQ Helm Chart
A Helm chart for deploying RabbitMQ 4.1 on Kubernetes with management plugin enabled.
Introduction
This chart bootstraps a RabbitMQ deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.19+
- Helm 3.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 .
Uninstalling the Chart
To uninstall/delete the my-rabbitmq deployment:
helm uninstall my-rabbitmq
Configuration
The following table lists the configurable parameters of the RabbitMQ chart and their default values.
| Parameter | Description | Default |
|---|---|---|
replicaCount | Number of replicas | 1 |
image.repository | RabbitMQ image repository | rabbitmq |
image.tag | RabbitMQ image tag | 4.1.0-management |
image.pullPolicy | Image pull policy | IfNotPresent |
auth.username | RabbitMQ admin username | admin |
auth.password | RabbitMQ admin password | changeme |
auth.erlangCookie | Erlang cookie for clustering | secretcookie |
service.type | Kubernetes service type | ClusterIP |
service.port | AMQP service port | 5672 |
service.managementPort | Management UI port | 15672 |
persistence.enabled | Enable persistence using PVC | true |
persistence.storageClass | PVC Storage Class | "" |
persistence.accessMode | PVC Access Mode | ReadWriteOnce |
persistence.size | PVC Storage Request | 8Gi |
resources.limits.cpu | CPU limit | 1000m |
resources.limits.memory | Memory limit | 2Gi |
resources.requests.cpu | CPU request | 500m |
resources.requests.memory | Memory request | 1Gi |
livenessProbe.enabled | Enable liveness probe | true |
readinessProbe.enabled | Enable readiness probe | true |
metrics.enabled | Enable Prometheus metrics | false |
ingress.enabled | Enable ingress | false |
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:
helm install my-rabbitmq . \
--set auth.password=secretpassword \
--set persistence.size=20Gi
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart:
helm install my-rabbitmq . -f values.yaml
Accessing RabbitMQ
Management UI
The RabbitMQ Management UI is accessible on port 15672. To access it locally:
kubectl port-forward svc/my-rabbitmq 15672:15672
Then open http://localhost:15672 in your browser and login with the configured username and password.
AMQP Connection
Applications can connect to RabbitMQ on port 5672 using the service name:
amqp://<username>:<password>@my-rabbitmq:5672/
Persistence
The RabbitMQ image stores data at the /var/lib/rabbitmq path of the container.
By default, the chart mounts a Persistent Volume at this location. The volume is created using dynamic volume provisioning.
Security
- The default credentials should be changed in production environments
- Use Kubernetes secrets to store sensitive information
- Consider enabling TLS for AMQP and management connections
- The erlang cookie should be unique per cluster
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 v1.2.0 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