ElastiCache Redis集群和Istio

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

我正在尝试从EKS中的容器内连接到我的ElastiCache Redis Cluster 5.0,该容器将Istio作为边车代理,但我经常得到MOVED错误循环。

我有1个具有2个副本的分片,并且我为每个分片+配置端点添加了ServiceEntry和VirtualService。

用于Istio路由的示例配置:

kind: ServiceEntry
metadata:
  name: redis-test-cluster
spec:
  hosts:
  - redis-cluster-test.XXXX.clustercfg.euw1.cache.amazonaws.com
  ports:
  - number: 6379
    name: tcp
    protocol: TCP
  resolution: NONE
  location: MESH_EXTERNAL
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: redis-test-cluster
spec:
  hosts:
  - redis-cluster-test.XXXX.clustercfg.euw1.cache.amazonaws.com
  http:
  - timeout: 30s
    route:
    - destination:
        host: redis-cluster-test.XXXX.clustercfg.euw1.cache.amazonaws.com
redis amazon-elasticache istio redis-cluster amazon-eks
1个回答
1
投票

请注意,Redis协议不是HTTP,因此您不能使用http VirtualService。

要控制像Redis这样的TCP协议的出口访问,请检查Egress Control for TLS section of the Consuming External MongoDB Services blog post

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