Kubernetes Istio特使504出站连接15秒后网关超时
背景: 我正在使用istio 1.2.5 我已经使用istio文档中的helm默认配置文件部署了istio,通过将跟踪、kiali和logLevel启用为“调试” istio系统命名空间中的我的POD和服务如下所示:Kubernetes Istio特使504出站连接15秒后网关超时,kubernetes,microservices,istio,amazon-eks,Kubernetes,Microservices,Istio,Amazon Eks,背景: 我正在使用istio 1.2.5 我已经使用istio文档中的helm默认配置文件部署了istio,通过将跟踪、kiali和logLevel启用为“调试” istio系统命名空间中的我的POD和服务如下所示: (⎈ |cluster-dev:default)➜ istio-1.2.5 git:(master) ✗ k pods -n istio-system NAME READY STATUS RE
(⎈ |cluster-dev:default)➜ istio-1.2.5 git:(master) ✗ k pods -n istio-system
NAME READY STATUS RESTARTS AGE
grafana-97fb6966d-cv5fq 1/1 Running 0 1d
istio-citadel-76f9586b8b-4bbcx 1/1 Running 0 1d
istio-galley-78f65c8469-v5cmn 1/1 Running 0 1d
istio-ingressgateway-5d5487c666-jjhb7 1/1 Running 0 1d
istio-pilot-65cb5648bf-4nfl7 2/2 Running 0 1d
istio-policy-8596cc6554-7sgzt 2/2 Running 0 1d
istio-sidecar-injector-76f487845d-ktf6p 1/1 Running 0 1d
istio-telemetry-5c6b6d59f6-lppqt 2/2 Running 0 1d
istio-tracing-595796cf54-zsnvj 1/1 Running 0 1d
kiali-55fcfc86cc-p2jrk 1/1 Running 0 1d
prometheus-5679cb4dcd-h7qsj 1/1 Running 0 1d
(⎈ |cluster-dev:default)➜ istio-1.2.5 git:(master) ✗ k svc -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
grafana ClusterIP 172.20.116.246 <none> 3000/TCP 1d
istio-citadel ClusterIP 172.20.177.97 <none> 8060/TCP,15014/TCP 1d
istio-galley ClusterIP 172.20.162.16 <none> 443/TCP,15014/TCP,9901/TCP 1d
istio-ingressgateway LoadBalancer 172.20.199.160 xxxxxxxxxxxxx... 15020:31334/TCP,80:31380/TCP,443:31390/TCP,31400:31400/TCP,15029:30200/TCP,15030:32111/TCP,15031:32286/TCP,15032:32720/TCP,15443:30857/TCP 1d
istio-pilot ClusterIP 172.20.137.21 <none> 15010/TCP,15011/TCP,8080/TCP,15014/TCP 1d
istio-policy ClusterIP 172.20.188.114 <none> 9091/TCP,15004/TCP,15014/TCP 1d
istio-sidecar-injector ClusterIP 172.20.47.238 <none> 443/TCP 1d
istio-telemetry ClusterIP 172.20.77.52 <none> 9091/TCP,15004/TCP,15014/TCP,42422/TCP 1d
jaeger-agent ClusterIP None <none> 5775/UDP,6831/UDP,6832/UDP 1d
jaeger-collector ClusterIP 172.20.225.255 <none> 14267/TCP,14268/TCP 1d
jaeger-query ClusterIP 172.20.181.245 <none> 16686/TCP 1d
kiali ClusterIP 172.20.72.227 <none> 20001/TCP 1d
prometheus ClusterIP 172.20.25.75 <none> 9090/TCP 1d
tracing ClusterIP 172.20.211.135 <none> 80/TCP 1d
zipkin ClusterIP 172.20.204.123 <none> 9411/TCP 1d
带有istio的微服务日志(日志中的响应耗时15.009秒)
我尝试在MS上创建一个虚拟服务,超时时间为30秒,但没有成功
我不确定我错过了什么。我需要帮助
关键点:
Internet(或从pod控制台)-->微服务-->微服务在代码中内部调用第三方遗留URL,每次都在15秒内超时
编辑和添加更多详细信息:
为了增加延迟,我尝试了“curl”http://slowwly.robertomurray.co.uk/delay/17000/url/http://www.google.com
“(17000=17秒)从任何一个装有istio代理侧车且总是在15秒时超时的微服务吊舱发出。
我不确定在哪里更改此15秒设置。似乎15秒是默认超时值。无论是Istio还是特使,我还需要进一步阅读 但是,有两个报告的问题,例如(Istio 0.2.12和Kubernetes 1.8.1),讨论的问题与您的问题非常相似: 入口>公共服务(超时60次) PUBLICSERVICE>BACKENDSERVICE(超时60次) 但是 INGRESS>PUBLICSERVICE>BACKENDSERVICE(我在默认15秒后获得超时) 您可以通读6860的讨论,但总而言之,他们引入了一个从1.0.0开始的修复程序,以便将超时设置为大于15秒。为此,您需要在VirtualServices中写入超时。例如,对于内部服务设置为60秒,对于外部服务设置为40秒,以便有足够的余量
请检查是否有帮助。似乎15秒是默认超时值。无论是Istio还是特使,我还需要进一步阅读 但是,有两个报告的问题,例如(Istio 0.2.12和Kubernetes 1.8.1),讨论的问题与您的问题非常相似: 入口>公共服务(超时60次) PUBLICSERVICE>BACKENDSERVICE(超时60次) 但是 INGRESS>PUBLICSERVICE>BACKENDSERVICE(我在默认15秒后获得超时) 您可以通读6860的讨论,但总而言之,他们引入了一个从1.0.0开始的修复程序,以便将超时设置为大于15秒。为此,您需要在VirtualServices中写入超时。例如,对于内部服务设置为60秒,对于外部服务设置为40秒,以便有足够的余量
请检查一下,看看它是否有用。经过多次尝试,我们终于成功了 参考: 因此,对于任何出站流量,无论您是否有出口网关,默认超时为15秒。因此,如果您想增加超时,您需要一个ServiceEntry和一个定义超时的VirtualService ServiceEntry
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: external-se-test
spec:
hosts:
- slowwly.robertomurray.co.uk
location: MESH_EXTERNAL
ports:
- number: 80
name: example-http
protocol: HTTP
resolution: DNS
虚拟服务
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: slow-ext
spec:
hosts:
- slowwly.robertomurray.co.uk
http:
- timeout: 30s
route:
- destination:
host: slowwly.robertomurray.co.uk
weight: 100
经过多次尝试,我们终于成功了 参考: 因此,对于任何出站流量,无论您是否有出口网关,默认超时为15秒。因此,如果您想增加超时,您需要一个ServiceEntry和一个定义超时的VirtualService ServiceEntry
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: external-se-test
spec:
hosts:
- slowwly.robertomurray.co.uk
location: MESH_EXTERNAL
ports:
- number: 80
name: example-http
protocol: HTTP
resolution: DNS
虚拟服务
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: slow-ext
spec:
hosts:
- slowwly.robertomurray.co.uk
http:
- timeout: 30s
route:
- destination:
host: slowwly.robertomurray.co.uk
weight: 100
我们在这个问题上被困了两天。我们在这个问题上被困了两天。
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: slow-ext
spec:
hosts:
- slowwly.robertomurray.co.uk
http:
- timeout: 30s
route:
- destination:
host: slowwly.robertomurray.co.uk
weight: 100