Search code examples
kubernetesrabbitmqgoogle-kubernetes-engineistioenvoyproxy

Allow traffic to rabbitMQ service from Istio


I've setup a K8S-cluster in GKE and installed RabbitMQ (from the marketplace) and Istio (via Helm). I can access rabbitMQ from pods until I enable the envoy proxy to be injected into these pods, but after that the traffic will not reach rabbitMQ, and I can't figure out how to enable traffic to the rabbitmq service.

There is a service rabbitmq-rabbitmq-svc (in the rabbitmq namespace) that is of type LoadBalancer. I've tried a simple busybox when I don't have envoy running and then I have no trouble telneting to rabbitmq (port 5672), but as soon as I try with automatic envoy injection envoy prevents the traffic. I tried unsuccessfully to add a DestinationRule. (I've added a rule but it makes no difference)

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: rabbitmq-rabbitmq-svc
spec:
  host: rabbitmq.rabbitmq.svc.cluster.local
  trafficPolicy:
    loadBalancer:
      simple: LEAST_CONN

It seems like it should be a simple solution, but I can't figure it out... :/

UPDATE Turns out it was a simple error in the hostname, ended up using this and it works:

apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: rabbitmq-rabbitmq-svc
spec:
  host: rabbitmq-rabbitmq-svc.rabbitmq.svc.cluster.local

Solution

  • Turns out it was a simple error in the hostname, the correct one was rabbitmq-rabbitmq-svc.rabbitmq.svc.cluster.local