I'm trying to use the go-redis cluster client (https://github.com/redis/go-redis) to connect from a locally running application to a locally running redis cluster within a locally running k8s cluster (k3d to run the k8s cluster, using the bitnami redis-cluster helm chart to stand up the redis cluster). I am port-forwarding the redis cluster ports using kubectl to local ports (10000, 10001, 10002), which should allow me to do the following:
client := redis.NewClusterClient(&redis.ClusterOptions{
Addrs: []string{":10000", ":10001", ":10002"},
})
I'm running into the issue that the cluster client logic begins with using first provided address (localhost:10000), and from there starts trying to use the k8s cluster IPs instead: "dial tcp 10.42.1.18:6379: i/o timeout"
Why does it not just use the addresses I have provided? Is there something I am doing wrong?