RabbitMq on Kubernetes Cluster using Helm

Install using helm

kubectl create namespace rabbitmq
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install myrmq bitnami/rabbitmq --namespace rabbitmq

Credentials

RabbitMQ can be accessed within the cluster on port `5672` at `myrmq-rabbitmq.rabbitmq.svc`.

Username : user

Password : kubectl get secret --namespace rabbitmq myrmq-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode

ErLang Cookie : kubectl get secret --namespace rabbitmq myrmq-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 --decode

Test

# Run a debug pod
kubectl run -i --tty --rm debug --image=python:3.10-slim-bullseye --restart=Never -- bash
pip3 install pika# Type python for replpython

# Inside the repl
import pika
credentials = pika.PlainCredentials('user', '<password from credentials above>')
parameters = pika.ConnectionParameters('myrmq-rabbitmq.rabbitmq.svc',5672,'/',credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
hello_q = channel.queue_declare(queue='hello')
hello_q.method.message_count
channel.basic_publish(exchange='',
routing_key='hello',
body='Hello W0rld!')
hello_q.method.message_count
connection.close()

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

ARK Desktop Wallet Update: v2.3 Released

How to use your code debugging skills to spot crypto scams.

All start with 1 step

My experience with the Makers Academy PreCourse challenges

KIP-2: Core Contributor Nomination for Era 1, Playground Labs

Does business care about algorithmic skills?

Text to Speech Converter

I Noticed The Change This Morning When I Signed On

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Natarajan Santhosh

Natarajan Santhosh

More from Medium

Kubernetes in production

Integrating Kubernetes Jobs With Azure Pipelines

Building Kubernetes Admission Webhooks (Part 2 of 2)