Is it possible to create a Redis Cluster within Kubernetes using a Istio Search Mesh?

I am trying to configure a Redis cluster onto Kubernetes with an Istio Mesh installed. The Redis Cluster is able to be created without Istio and each Pods are auto-injected with an Istio Proxy (Envoy). However, with Istio installed and the Istio proxy attached to each Redis Pods, the Redis cluster is not able to “meet” correctly through the CLUSTER MEET command from the CLI.

For instance, I have Redis Pod A (slot 0 - 10919) and Redis Pod B (slot 10920 - 16383). This is the result after attempting a CLUSTER MEET command between them (cluster meet ClusterIPForRedisPodB 6379). For Redis Pod A, the cluster info is updated and includes Redis Pod B (https://i.stack.imgur.com/UYnp0.png). On the contrary, for Redis Pod B, the cluster info is not updated and does not include Redis Pod A (https://i.stack.imgur.com/OkRU4.png).

I am able to send curl and netcat responses between the two Pods for Port 16379 and 6379. In addition, Envoy appears to have these ports opened as well.

Just encountering this now. It seems that Redis does not support the use of hostnames/fqdns for

cluster meet

command. Theres a 5 year open issue on Redis Github CLUSTER MEET doesn't allow hostname to be used · Issue #2410 · redis/redis · GitHub.

As a temporary workaround you can add the following annotation to the pod definition

  traffic.sidecar.istio.io/excludeInboundPorts: "16379"
  traffic.sidecar.istio.io/excludeOutboundPorts: "16379" 

However this means that the cluster channel is now not using mtls via Istio - so not suitable for production use.

Be good to hear if anyone has resolution for this.

So got this (redis multimaster) working using istio 1.5
The steps were
add port 16379 to the headless service for your statefulset
set the POD_IP as an environment variable (as in the FAQ above)
for multimaster clustering then echo cluster-announce-ip $POD_IP >> /etc/redis/redis.conf

1 Like

@rtmie - I know it has been awhile, but is there any way that you could post the yaml that you used to get this to work? I am in the same boat - Redis pods come up, but they will not form a Cluster with ISTIO enabled. For me, the CLUSTER MEET just hangs and looks like it is retrying over and over, but never forms.