You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite there is an ability to use LoadBalancer service in Master-Replicas with Sentinel topology, we cannot get access to Redis installation from outside of K8s, because sentinel returns to clients just internal K8s FQDN of master Pod.
E.g.:
# Redis installation in 'Master-Replicas with Sentinel' topology
kubectl -n redis get po
NAME READY STATUS RESTARTS AGE
redis-node-0 2/2 Running 0 72d
redis-node-1 2/2 Running 0 72d
redis-node-2 2/2 Running 0 72d
# 10.90.11.96 - LoadBalancer IP of the Redis installation
kubectl -n redis get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
redis LoadBalancer 10.96.135.84 10.90.11.96 6379:32467/TCP,26379:32413/TCP 86d
redis-headless ClusterIP None <none> 6379/TCP,26379/TCP 86d
# Trying to connect to this Redis via LoadBalancer IP
redis-cli -h 10.90.11.96 -p 26379 -a '<password>' 2>/dev/null
10.90.11.96:26379> SENTINEL GET-MASTER-ADDR-BY-NAME redis
1) "redis-node-2.redis-headless.redis.svc.cluster.local"
2) "6379"
In example above we successfully got Redis master's address, but it is internal K8s FQDN and we cannot use it from outside of K8s.
What is the feature you are proposing to solve the problem?
It would be nice to have an ability to discover Redis master from outside of K8s cluster.
Only one idea:
Add K8s Service resource that should select only master Pod. This Service resource should contain individual selector e.g. master: true
Implement simple app that will continuously check Redis master Pod and mark it with label master: true
iamalryz
changed the title
External access to cluster in Master-Replicas with Sentinel topology
[bitnami/redis] External access to cluster in Master-Replicas with Sentinel topology
Apr 19, 2024
@iamalryz can you please share the values.yaml? I also have redis+setinel setup & I successfully use master with lb using: createMaster: true, did you try it?
@shlomitubul thaks! I used older version of Redis Helm chart where there is no sentinel.service.createMaster parameter. I just tried newest chart version and it works fine.
Name and Version
bitnami/redis
What is the problem this feature will solve?
Despite there is an ability to use LoadBalancer service in
Master-Replicas with Sentinel
topology, we cannot get access to Redis installation from outside of K8s, because sentinel returns to clients just internal K8s FQDN of master Pod.E.g.:
In example above we successfully got Redis master's address, but it is internal K8s FQDN and we cannot use it from outside of K8s.
What is the feature you are proposing to solve the problem?
It would be nice to have an ability to discover Redis master from outside of K8s cluster.
Only one idea:
master: true
master: true
This approach already used in combor / k8s-mongo-labeler-sidecar
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: