This guide will show you how to collect the open source Rabbitmq log in Kubernetes.
1. Copy the file from github link
https://github.com/rabbitmq/support-tools/blob/main/scripts/rabbitmq-collect-env
2. Go to the rabbitmq node
kubectl exec -it rabbitmq2 -n rabbitmq-system
3. Use the following command to generate the file with above commands, past the contents and press CTRL + D
cat > collect-env.sh
4. Change the permission of this file
chmod+x collect-env.sh
5. Collect the rabbitmq log
./collect-env.sh