Redis Sentinel Removal in Kubernetes Environment

12/29/2021

I have a couple of queries regarding deploying Redis Sentinel on kubernetes. My setup does not require Redis to persist any data (E.g. I don't care if data is lost) since the data is really just a hot-cache of ephemeral data. However I do need Redis to be Highly Available (HA).

I looked at some of the helm charts out there but but decided to experiment with my own simple setup for the time being to learn more.

  1. When I deploy 3x Sentinels and, for testing, I delete one of the Sentinel pods, all seems ok initially. However reading the docs it says that "Removing a Sentinel is a bit more complex: Sentinels never forget already seen Sentinels".

How can we manage this in a Kubernetes environment where Pods will be deleted/rolled/upgraded from time to time? Does it matter if Sentinel pods disappear and are replaced by a new one, so long as we can still reach quorum? (E.g total number of instances remains constant.)

  1. I have no real need (or support) for persistent volumes in my setup. My Sentinel config is written by an init-container using a default service configuration, pointing to the k8s service-names. Obviously, as Sentinel pods come and go, different masters will be elected.

Does it matter if I do not persist my Sentinel config and just let the new Sentinel instance discover the other members and the master?

-- Freefall
kubernetes
redis
redis-sentinel

0 Answers