Connecting the redis-sentinel to the redis-master on Kubernetes Connecting the redis-sentinel to the redis-master on Kubernetes kubernetes kubernetes

Connecting the redis-sentinel to the redis-master on Kubernetes


There are few things you need to consider when deploying Redis-sentinel that can go wrong in your particular use case:

  1. Check firewall rules. Make sure port 26379 of your servers is open. Sentinels by default run listening for connections to TCP port 26379. Otherwise Sentinels can't talk and can't agree about what to do.

  2. Check your Sentinel configuration file - sentinel.conf and Redis configuration file - redis.conf. It is mandatory to use a configuration file when running Sentinel, as this file will be used by the system in order to save the current state that will be reloaded in case of restarts. Sentinel will simply refuse to start if no configuration file is given or if the configuration file path is not writable.

  3. You need at least three Sentinel instances for a robust deployment.

You can find more info regarding some of the above info here.

Please let me know if that helped.


I am just assuming that you are trying to connect to the pod from outside. You are connecting to 127.0.0.1 which does not exist inside the Kubernetes environment. You need to connect to the IP of the Pod which you get by simply running

kubectl describe pod

or you can create a service and use the name of the service as an env variable in the sentinels.


You can't connect it like this. You must check services on Kubernetes. you can see Redis service IP address. you must connect with the IP address