This is kind of similar to this thread:
https://groups.google.com/forum/#!searchin/redis-db/docker/redis-db/midrbfgxBrQ/o8Egs60y-cgJ except that it applies to redis cluster, and doesn't have a nice solution as far as I can see.
Essentially, I have a set of docker containers running on a host, each running a single redis cluster instance. The host's ip is 172.17.8.101 and it is reachable from other hosts. The containers, however, see only an ip subnet in the 10.0.0.0 range. They can communicate with each other over this range, but outside boxes cannot.
When I start up a cluster I do a:
Since I've mapped the ports in the containers to their corresponding ports on the host this works, and I get the following output at the end:
slots:0-5460 (5461 slots) master
slots:5461-10922 (5462 slots) master
slots:10923-16383 (5461 slots) master
[OK] All nodes agree about slots configuration.
But when I do a "cluster nodes" on any node in the cluster I get the following:
e14cb8715db04e2d0d0c9084d4512532e0425276
10.1.0.246:6479 myself,master - 0 0 1 connected 0-5460
931e7e6242b79baf2ab95baed497c6bf18f4e050
10.1.42.1:6481 master - 0 1422752155029 3 connected 10923-16383
300a7f463c398f8c614fe739e26a75c8166a1977
10.1.42.1:6480 master - 0 1422752156033 2 connected 5461-10922
So the cluster nodes are advertising the ips they think they have within the docker containers, but these ips aren't actually reachable from outside the docker host, so when outside clients call "cluster slots" they get a bunch of unusable ips. I tried setting the bind parameter to 172.17.8.101, but the instances would then fail to start up since within the container that ip isn't actually assigned, only the 10.0.0.0 one.
I think the ideal solution would be to somehow allow for users to specify the advertised ip:port of a cluster instance. That's probably a rather big change to make this late in the rc game, so I'm definitely open to other solutions (or just putting the issue off all-together). Thanks for reading this far, and I'm happy to answer any questions about my setup that might also be contributing to the problem.