Kubernetes RabbitMQ Cluster Install

Arif KIZILTEPE
2 min readOct 11, 2022

--

RabbitMQ installation on kubernetes very easy. Because many configuration prepared by rabbitmq. We are gonna only create cluster with true parametres

First step install RabbitMQ operator on kubernetes. This operator manage our rabbitmq replicas.

kubectl apply -f https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml

Check rabbitmq companents

kubectl get all -o wide -n rabbitmq-system

RabbitMQ operator is ready. Need create pod with configure replica. Create new manifest like below and install on kubernetes. You can change cluster configuration.

#rabbitmqcluster.yaml
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: k8stest-rabbitmqcluster
spec:
replicas: 3
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 1
memory: 2Gi
rabbitmq:
additionalConfig: |
log.console.level = info
channel_max = 700
default_user= guest
default_pass = guest
default_user_tags.administrator = true
service:
type: LoadBalancer
kubectl apply -f rabbitmqcluster.yaml

How to Fix unknown filesystem type ‘glusterfs’

My topology has glusterfs dynamic storage pool. If you use same or different storage on kubernetes. Maybe can take error like below when creating pod.

You must install glusterfs or different storage manager tool client on all kubernetes environment.

wget -O - https://download.gluster.org/pub/gluster/glusterfs/9/rsa.pub | apt-key add -DEBID=$(grep 'VERSION_ID=' /etc/os-release | cut -d '=' -f 2 | tr -d '"')DEBVER=$(grep 'VERSION=' /etc/os-release | grep -Eo '[a-z]+')DEBARCH=$(dpkg --print-architecture)echo deb https://download.gluster.org/pub/gluster/glusterfs/LATEST/Debian/${DEBID}/${DEBARCH}/apt ${DEBVER} main > /etc/apt/sources.list.d/gluster.listapt update && apt install glusterfs-client

After installation error was fixed.

And check rabbitMQ cluster.

kubectl get all -l app.kubernetes.io/part-of=rabbitmq

Can reach with LoadBalance ip address. User and password was defined in rabbitmqcluster manifest file.

WEB UI URL → http://10.30.90.99:15672/

See you later next article

--

--