Hi
I am trying to setup redis cluster on Kubernetes using statefulset(
my statefulset yaml).
One of my requirements is that my redis cluster should be kubernetes cluster restart(due to issues like power failure) resilient.
On reboot, new set of IP addresses are assigned to redis pods and since redis instances
communicates on IP address, they are not able to form cluster again.
Other option I am considering is using services with static IP(clusterIP) over individual redis instance deployment/replication-controller but the same problem exists here also, redis cluster is formed using IP of Pods and not services. This approach is suggested by Kelsey Hightower
here. Anotehr downside of this approch is lot more manual management for scaling and rolling upgrades.
Is statefulset right choice for such usecases?
Is there a way by which I can assign static IP to pods in statefulset or deployment?
Thanks.