RabbitMQ pod web username and password?

4/10/2020

I am trying to learn more about Kubernetes in my spare time.

At the moment I am trying to setup RabbitMQ, so I went here: https://github.com/bitnami/charts/tree/master/bitnami/RabbitMQ. I have done this:

helm install my-release --set rabbitmq.username=admin,rabbitmq.password=secretpassword,rabbitmq.erlangCookie=secretcookie bitnami/rabbitmq

then:

kubectl port-forward --namespace default svc/my-release-rabbitmq 15672:15672

I can then browse to http://localhost:15672/

Powershell says this:

enter image description here

I am interested in this (from Poweshell):

echo "Password      : $(kubectl get secret --namespace default my-release-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode)"

How do I get the password?

-- w0051977
docker
kubernetes
rabbitmq

2 Answers

4/10/2020

You can find instructions for setting your username/password at the bottom of this readme.

helm install rabbitmq \
  --set rabbitmq.username=admin,rabbitmq.password=secretpassword,rabbitmq.erlangCookie=secretcookie \
    bitnami/rabbitmq
-- Yaron Idan
Source: StackOverflow

4/10/2020

This has worked for me:

1) helm install release --set rabbitmq.username=admin,rabbitmq.password=secretpassword,rabbitmq.erlangCookie=secretcookie bitnami/rabbitmq

2) kubectl port-forward --namespace default svc/my-release-rabbitmq 15672:15672

3) browse to: localhost:15672

4) login as: admin/secretpassword

I am using Helm 3 so I had to say: helm install release instead of just helm install i.e. I had to specify a name.

Also note that I had to change the name to release instead of my-release as it does not like the dash (in step 1 and step 2). I am using Windows (Docker for Windows with Linux containers if that makes a difference).

-- w0051977
Source: StackOverflow