I'm running a Redis Cluster with 6 nodes (3 masters, 3 replicas) in Docker containers on Windows using bridge networking. Each container maps its port (e.g., 7010:7010, 7011:7011, etc.) so external clients can connect via 127.0.0.1:7010, 127.0.0.1:7011, etc. Current Behavior: When I create the cluster using internal Docker IPs (e.g., 192.168.144.2:7010), the cluster works perfectly for inter-node communication. However, when external clients connect, they receive MOVED redirections pointing to internal Docker IPs like 192.168.144.2:7011, which are unreachable from the host machine. What I've Tried:
Setting cluster-announce-ip 127.0.0.1 in redis.conf for all nodes - This causes all 127.0.0.1 nodes to show as "disconnected" in CLUSTER NODES because each container interprets 127.0.0.1 as itself, not the other containers. Creating cluster with 127.0.0.1 addresses - Fails with "Connection refused" because containers cannot reach each other via localhost. Applying announce settings after cluster creation via CONFIG SET - Results in mixed state where some nodes show 127.0.0.1 (disconnected) and others show internal IPs (connected).
Example nodes.conf showing the problem: 2f167b60 127.0.0.1:7010@17010 master - disconnected 0-5460 1b58373c 192.168.144.7:7013@17013 slave - connected e237ac08 127.0.0.1:7011@17011 myself,master - connected 5461-10922 Questions:
Is it possible to configure Redis Cluster so nodes communicate internally using Docker IPs (192.168.X.X) but announce 127.0.0.1 to external clients for redirections? Is there a correct order of operations (cluster creation → announce IP setting → restart/gossip) that makes this work? Are there alternative approaches for Docker bridge networking on Windows that don't require clients to use nodeAddressMap?
Environment:
Redis: 7.4.6 (redis-stack-server) Docker: Bridge network mode OS: Windows 11 Each node exposes ports in format PORT:PORT (e.g., 7010:7010, 17010:17010)
Goal: External clients should connect using only 127.0.0.1:7010-7015 without needing to know internal Docker IPs or configure nodeAddressMap.