Azure Kubernetes上的Redis分片群集

问题描述 投票:0回答:1

我已经关注了这些链接

  1. https://medium.com/zero-to/setup-persistence-redis-cluster-in-kubertenes-7d5b7ffdbd98
  2. https://github.com/sanderploegsma/redis-cluster

在AKS上构建Redis分片群集,但是它们是使用Pod IP连接的,但是我需要使用“ Python”将其连接到该群集以将数据输入其中,因为它们是使用Pod IP在内部连接的,使用Python进行连接。另外,我用一个6个服务创建了6个不同的有状态集,而不是一个有状态集的6个副本,所有这些都在外部以“ Load Balancer”的形式公开,但是这些命令使它们成为一个集群。

kubectl exec -it redis-cluster-0 -- redis-cli --cluster create --cluster-replicas 1 \
$(kubectl get pods -l app=redis-cluster -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')

我不知道如何编辑它以使用负载均衡器IP而不是Pod IP,因此使用这6个外部IP,我无法创建集群。我需要Azure Kubernetes Services上的Redis分片群集,可以从Python库“ redis-py-cluster”从外部进行访问]

提前感谢

我已按照以下链接https://medium.com/zero-to/setup-persistence-redis-cluster-in-kubertenes-7d5b7ffdbd98、https://github.com/sanderploegsma/redis-cluster建立了Redis分片集群...

python-3.x azure kubernetes redis redis-cluster
1个回答
0
投票

theory

© www.soinside.com 2019 - 2024. All rights reserved.