rabbitmq

by magefleet

Helm chartv1.2.0App 4.1.0

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.

ParameterDescriptionDefault
replicaCountNumber of replicas1
image.repositoryRabbitMQ image repositoryrabbitmq
image.tagRabbitMQ image tag4.1.0-management
image.pullPolicyImage pull policyIfNotPresent
auth.usernameRabbitMQ admin usernameadmin
auth.passwordRabbitMQ admin passwordchangeme
auth.erlangCookieErlang cookie for clusteringsecretcookie
service.typeKubernetes service typeClusterIP
service.portAMQP service port5672
service.managementPortManagement UI port15672
persistence.enabledEnable persistence using PVCtrue
persistence.storageClassPVC Storage Class""
persistence.accessModePVC Access ModeReadWriteOnce
persistence.sizePVC Storage Request8Gi
resources.limits.cpuCPU limit1000m
resources.limits.memoryMemory limit2Gi
resources.requests.cpuCPU request500m
resources.requests.memoryMemory request1Gi
livenessProbe.enabledEnable liveness probetrue
readinessProbe.enabledEnable readiness probetrue
metrics.enabledEnable Prometheus metricsfalse
ingress.enabledEnable ingressfalse

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.

  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.2.0 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