RabbitMQ pod web username and password?

百般思念 提交于 2020-04-17 21:29:25

问题


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:

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?


回答1:


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



回答2:


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



来源:https://stackoverflow.com/questions/61145999/rabbitmq-pod-web-username-and-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!