我正在运行一个启用了Istio的EKS集群。我已经启动了一个EC2实例,其中运行着一个redis服务器。EKS集群和Redis都在同一个VPC内。所有入站和出站规则都允许这两个规则。但是,当我试图访问pod中的redis实例时,它抛出了"Connection reset by peer",而它在非istio pod中工作得很好。可能的原因是什么?
Istio版本:-
image: docker.io/istio/pilot:1.4.3
imagePullPolicy: IfNotPresent
image: docker.io/istio/proxyv2:1.4.3
imagePullPolicy: IfNotPresent我还在该名称空间中创建了一个Serviceentry。
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: svc-redis
namespace: mynamespace
spec:
hosts:
- "redis-X.xxx.xxxx"
location: MESH_EXTERNAL
ports:
- number: 6379
name: http
protocol: REDIS
resolution: NONE发布于 2020-04-10 19:43:25
由于您使用域名作为主机,因此需要将分辨率设置为DNS。因为当您将分辨率设置为None时。它将尝试连接到IP地址,而不是使用域名。
这是我用于外部Redis访问的服务条目。
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: redis-svc
spec:
hosts:
- redis01.example.com
ports:
- number: 6379
name: redis
protocol: TCP
resolution: DNS
location: MESH_EXTERNALhttps://stackoverflow.com/questions/61139104
复制相似问题