<p>I've installed RabbitMQ on a Kubernetes Cluster using Helm as follows:</p>
<p><code>helm repo add bitnami https://charts.bitnami.com/bitnami</code></p>
<p><code>helm install my-release bitnami/rabbitmq-cluster-operator</code></p>
<p>Then I setup a Go Client something like this running as a service on the same Kubernetes Cluster</p>
<p><code>import amqp &quot;github.com/rabbitmq/amqp091-go&quot; </code></p>
<p><code>conn, err = amqp.Dial(&quot;amqp://guest:guest@localhost:5672/&quot;)</code></p>
<p>But the client  fails to  connect. How do I figure out  what the host and port should  be set to for RabbitMQ on a Kubernetes Cluster?</p>

Adrian
<p>If your Go client is running as a microservice on the same cluster, you need to use the appropriate DNS record to access it, <code>localhost</code> just attempts to access the Go client microservice itself.</p>
<p>In the namespace where RabbitMQ is installed, you can run <code>kubectl get svc</code> and there should be a ClusterIP service running with port 5672, likely called <code>my-release</code>.</p>
<p>You can then connect to it from any other service in the cluster with <code>my-release.NAMESPACE.svc.DOMAIN</code>.</p>
<p>The Helm release notes also show how to connect to the service, as well as many other helpful notes like authentication username and password, as well as external access availability etc.</p>
<p><code>helm get notes my-release</code></p>
