I was recently working with the RabbitMQ Cluster Kubernetes Operator, which provides an easy way to deploy and manage RabbitMQ clusters using Kubernetes (k8s). In fact, the VMware Event Broker Appliance (VEBA) solution also makes use of RabbitMQ operator as part of its backend infrastructure.
While troubleshooting my RabbitMQ deployment yesterday, I came to learn about a really useful tip in accessing the RabbitMQ management console UI which provides a number of useful pieces of information including resource utilization. Once logged in, we quickly found the issue which was due to memory pressure and once that was resolved, everything was working as expected.
I was not aware that RabbitMQ had this useful dashboard and that you could easily access it once you knew how to retrieve the credentials.
In my setup, I have the RabbitMQ cluster deployed in the vmware-functions k8s namespace and the name of the deployment is called veba-rabbit
Step 1 - Retrieve the username and password for your RabbitMQ cluster by running the following command and replace the namespace and deployment name with the one you used:
kubectl -n vmware-functions get secrets veba-rabbit-default-user -o json | jq -r '.data."default_user.conf"' | base64 -d
Step 2 - Enable port forwarding for the RabbitMQ Cluster on the default port 15672 by running the following command and replace the namespace and deployment name with the one you used:
kubectl -n vmware-functions port-forward services/veba-rabbit 15672
Step 3 - On your local computer, open a web browser to http://localhost:15672 and then login with the credentials from Step 1.
As mentioned earlier, VEBA also uses the RabbitMQ operator and if you wish to access the UI, mainly for educational and learning purposes, the instructions below can be used.
Step 1 - Enable TCP forwarding so that we can use SSH tunnel to access the RabbitMQ UI. SSH to VEBA appliance and edit /etc/ssh/sshd_config and comment AllowTcpForwarding no and then restart SSH by running systemctl restart sshd
Step 2 - Run the following to retrieve the RabbitMQ UI credentials:
kubectl -n vmware-system get secret veba-rabbit-default-user -o json | jq -r '.data."default_user.conf"' | base64 -d
Step 3 - Run the following command to port forward the RabbitMQ cluster:
kubectl -n vmware-system port-forward services/veba-rabbit 15672
Step 4 - On your local computer, open a new SSH session to your VEBA appliance specifying the following:
ssh root[at]veba.primp-industries.local -L 15672:localhost:15672 -N
Note: Once you successfully enter your VEBA credentials, the terminal will look like it is hanging and this is expected
Step 5 - Open a web browser to http://localhost:15672 and then login with the credentials from Step 2.
Thanks for the comment!