问题描述
我正在尝试将Redis前哨拓扑部署到我的Kubernetes集群中。我正在使用bitnami-redis舵图,到目前为止,该舵图在非哨兵部署中效果很好。
我实质上使用的是示例here的helm值示例,只是用type: ClusterIP
替换了大多数type: LoadBalancer
以便从集群外部访问这些服务。
我已经用cluster.enabled=true
和sentinel.enabled=true
部署了头盔图表,并且目前能够从集群外部(使用redis-cli -h {external_sentinel_ip} -p 26379
访问哨兵节点。但是,当我尝试询问用于将地址发送给当前主服务器的哨兵,它正在向我返回一个群集本地IP地址。
redis-cli
的示例输出...
{external_sentinel_ip}:26379> sentinel get-master-addr-by-name mymaster
1) "{cluster_local_ip}" # <-- Here
2) "6379"
我连接到该哨兵实例的外部客户端不在群集中,因此它们无法使用此IP到达主服务器。
在bitnami docs中,他们明确提及This command will return the address of the current master,which can be accessed from inside the cluster.
。
我想知道是否可以通过这种方式配置舵图,以使redis返回这些主实例的外部IP。
有什么想法吗?这些文档没有提供这样的用例,但是我不敢相信以前从来没有这样的要求。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)