简体   繁体   中英

How to expose the Redis+Sentinel to outside in KiND cluster

I am new to Kubernetes. I am using Given Link to create 3 node Redis cluster(1 master and 2 slaves) and 3 node sentinel. It is easy to get started but I am confused with the 2 following things

  1. I am running it KiND cluster so I need to know how can I access the Redis cluster from local. I think I need to create a service and expose it but I am not sure how.

  2. I am not sure if from outside, I access the master or the sentinel to access the Redis cluster.

  3. If I access either of master or sentinel, what would happen to the connection, if the given pod crashes and restarts.

I am new to k8s but I hope the question wasn't completely stupid. Also there is a supplement video for this can be found here

You can expose Redis master outside the cluster using the master.service.type parameter (set it to NodePort or LoadBalancer types). That said, it's very likely that Redis Sentinel is not returning the external IP/port or the Redis master node but the internal ones instead

You may use redisinsight as web based UI to monitor and trace Redis cluster https://gist.github.com/chrisedrego/9a428ed94126445af4770a749bf797e5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM