Hi
I'm trying to set up a rabbitmq cluster inside my kubernetes cluster and running in to some difficulties. I was wondering if anyone had any experience setting one up.
So far my problem is nodenames / hostnames. When I do "join_cluster" I need to give a parameter that resolves with DNS.
To achieve this in Kubernetes I am using the DNS addon, this allows services to resolve to IPs. I then define a service that points to my RabbitMQ pod.
However - with this setup I have a DNS name "rabbitmq.default.cluster.local" that resolves correctly but the actual container's hostname is something else (rabbitmq-dfjs1).
So when I try and add it to the cluster I get this error:
attempted to contact: ['rab...@rabbitmqmaster.default.cluster.local']
rab...@rabbitmqmaster.default.cluster.local:
* connected to epmd (port 4369) on rabbitmqmaster.default.cluster.local
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* suggestion: hostname mismatch?
* suggestion: is the cookie set correctly?
* suggestion: is the Erlang distribution using TLS?
(The cookies are identical, TLS is disabled)
Which I suspect is because my container running rabbitmq has the hostname "rabbitmq-dfjs1", not "rabbitmq.default.cluster.local".
Have any kubernetes users come across this issue and found a decent solution?
Thanks
Andy