Damian
Damian

Reputation: 3050

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

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.

Upvotes: 1

Views: 530

Answers (1)

P Ekambaram
P Ekambaram

Reputation: 17689

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

Upvotes: 2

Related Questions