OT-CONTAINER-KIT / redis-operator

A golang based redis operator that will make/oversee Redis standalone/cluster/replication/sentinel mode setup on top of the Kubernetes.
https://ot-redis-operator.netlify.app/
Apache License 2.0
820 stars 227 forks source link

External Service access as LoadBalancer for cluster #1048

Open sujitkagarwal opened 2 months ago

sujitkagarwal commented 2 months ago

What version of redis operator are you using? v0.18.0

kubectl logs <_redis-operator_pod_name> -n <namespace>

LM0005409:~ sujit.agarwal$ redis-cli -h 10.157.237.119 -p 30830 10.157.237.119:30830> set 30 60 (error) MOVED 9877 10.244.32.251:6379 10.157.237.119:30830> exit LM0005409:~ sujit.agarwal$ redis-cli -h 10.157.237.119 -p 30830 -c 10.157.237.119:30830> set 30 60 -> Redirected to slot [9877] located at 10.244.32.251:6379 Could not connect to Redis at 10.244.32.251:6379: Connection refused Could not connect to Redis at 10.244.32.251:6379: Connection refused (2.14s) not connected>

redis-operator version:

v0.18.0 Does this issue reproduce with the latest release? yes

What operating system and processor architecture are you using (kubectl version)?

kubectl version Output
$ kubectl version

What did you do?

What did you expect to see?

It should allow to connect the redis cluster with external service when deploy in cluster mode outside of kuberntes. I think afetr connect it pass pod id which is not accessible outside of kubernets.

What did you see instead?

woodliu commented 2 months ago

@sujitkagarwal I think this may caused by the networkpolicy or the CNI you used. Can you access 10.244.32.251:6379 inside your pod?