How to configure Redis Kubernetes deployment to make slave redis pod takeover when master is down?

10/25/2019

I have followed a tutorial to deploy Redis master and slave deployment. Both slave and master have its own services. I have Spring boot app that has master host in its configuration to save/read the data from it. So when I terminate redis-master pod the Spring boot app is going down as it doesn't know that it should connect to slave. How to solve that? I was thinking about creating a common service for both master and slave, but this way the spring boot app will at some point try to save data to a slave pod instead of master.

-- Damian
kubernetes
redis
spring-boot

1 Answer

10/26/2019

Use StatefulSets for redis deployment In HA. Use sentinel as sidecar container to manage failover

-- P Ekambaram
Source: StackOverflow