How to access RabbitMQ server running in Kubernetes from outside kube cluster?

906 views
Skip to first unread message

Parashar Singh

unread,
Aug 15, 2023, 12:47:45 PM8/15/23
to rabbitmq-users
Could someone help me to understand - how RabbitMQ service running in Kubernetes can be used by publisher/subscribers running outside kubernetes?

I tried setting up nodeport and access it with IP:Port_number, but it's not able to make the connection.

Any help on this would be highly appreciated.

- Parashar

Michal Kuratczyk

unread,
Aug 16, 2023, 4:03:31 AM8/16/23
to rabbitm...@googlegroups.com
Hi,

This has little to do with RabbitMQ and much more with Kubernetes. I think the simplest answer is "the same way you access all your other apps running in Kubernetes from outside Kubernetes".
This may be a LoadBalancer service or any of the Kubernetes networking technologies. As far as RabbitMQ / RabbitMQ clients are concerned, as long as you can make TCP connections,
it's good (assuming sufficiently low latency / sufficiently high throughput). NodePort is one of the options, although I don't think it is very popular. You haven't provided any info to try to understand
why it's not working, but either way - the usual network debugging steps apply (tcpdump/wireshark). You can also start nginx or something else with a NodePort configuration to see if that works
(it probably won't either).

Best,

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/f861c5e5-5b52-4f99-8160-8b7c93369629n%40googlegroups.com.


--
Michał
RabbitMQ team

Mirah Gary

unread,
Aug 16, 2023, 4:57:09 AM8/16/23
to rabbitmq-users
A service of type NodePort exposes the service on a specific port to nodes inside of the Kubernetes cluster, and thus will not provide access to the service outside of the Kubernetes cluster. As Michał stated, to access RabbitMQ from outside Kubernetes, use one of the standard Kubernetes ways of making a service externally accessible, i.e. provisioning a service of type LoadBalancer or using an Ingress Controller which supports TCP.

Best,
Reply all
Reply to author
Forward
0 new messages