I have a redis sentinel master slave setup with 1 master and 3 slaves and this is in Kubernetes environment.In the spring lettuce configuration, I have to specify the sentinels URLs with port numbers. How should I specify the URL for each sentinel? Spring doc specifies IP and port. In the local it's ok but when in k8s, how should I configure? I installed the set up with bitnami redis chart. Below is how it's done locally.
@Bean
public RedisConnectionFactory lettuceConnectionFactory() {
RedisSentinelConfiguration sentinelConfig = new RedisSentinelConfiguration()
.master("mymaster")
.sentinel("127.0.0.1", 26379)
.sentinel("127.0.0.1", 26380);
return new LettuceConnectionFactory(sentinelConfig);
}
Thanks