<p>In Google Cloud Platform, my goal is to have one cluster with a message queue and a pod to consume these in another cluster with MCS (Multi Cluster Service). When trying this out with only <em>one</em> cluster it went fairly smooth. I used the container name with the port number as the endpoint to connect to the redpanda message queue like this:</p>
<img src="https://i.stack.imgur.com/OS5ER.png" height="250">
<p>Now I want to do this between two clusters, but I'm having trouble configuring stuff right. This is my setup:</p>
<p><a href="https://i.stack.imgur.com/GaQPr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GaQPr.png" alt="enter image description here" /></a></p>
<p>I followed <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/multi-cluster-services" rel="nofollow noreferrer">this guide</a> to set the clusters up which seemed to work (hard to tell, but no errors), and the redpanda application inside the pod is configured to be on <code>localhost:9092</code>. Unfortunately, I'm getting a Connection Error when running the consumer on <code>my-service-export.my-ns.svc.clusterset.local:9092</code>.</p>
<p>Is it correct to expose the pod with the message queue on its localhost?</p>
<p>Are there ways I can debug or test the connection between pods easier?</p>

NorwegianClassic
<p>Ok, got it working. I obviously misread the setup at one point and had to re-do some stuff to get it working.</p>
<p>Also, the <code>my-service-export</code> should probably have the same name as the service you want to export, in my case <code>redpanda</code>.</p>
<p>A helpful tool to check the connection without running up a consumer is the simple <code>dnsutils</code> image. Use this deployment file and change the namespace to <code>my-ns</code>:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: dnsutils
  namespace: my-ns # &lt;----
spec:
  containers:
    - name: dnsutils
      image: k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3
      command:
        - sleep
        - &quot;3600&quot;
      imagePullPolicy: IfNotPresent
  restartPolicy: Always
</code></pre>
<p>Then spin it up with <code>apply</code>, <code>exec</code> into it, then run <code>host my-service-export.my-ns.svc.clusterset.local</code>. If you get an IP back you are probably good.</p>
