1

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 one 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:

Now I want to do this between two clusters, but I'm having trouble configuring stuff right. This is my setup:

enter image description here

I followed this guide 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 localhost:9092. Unfortunately, I'm getting a Connection Error when running the consumer on my-service-export.my-ns.svc.clusterset.local:9092.

Is it correct to expose the pod with the message queue on its localhost?

Are there ways I can debug or test the connection between pods easier?

NorwegianClassic
  • 935
  • 8
  • 26

1 Answers1

1

Ok, got it working. I obviously misread the setup at one point and had to re-do some stuff to get it working.

Also, the my-service-export should probably have the same name as the service you want to export, in my case redpanda.

A helpful tool to check the connection without running up a consumer is the simple dnsutils image. Use this deployment file and change the namespace to my-ns:

apiVersion: v1
kind: Pod
metadata:
  name: dnsutils
  namespace: my-ns # <----
spec:
  containers:
    - name: dnsutils
      image: k8s.gcr.io/e2e-test-images/jessie-dnsutils:1.3
      command:
        - sleep
        - "3600"
      imagePullPolicy: IfNotPresent
  restartPolicy: Always

Then spin it up with apply, exec into it, then run host my-service-export.my-ns.svc.clusterset.local. If you get an IP back you are probably good.

NorwegianClassic
  • 935
  • 8
  • 26