問(wèn)題: 任何啟用了sidecar的服務(wù)洛退,往外發(fā)送http請(qǐng)求的時(shí)候瓣俯,15秒就超時(shí)红淡。
調(diào)查發(fā)現(xiàn), 對(duì)于K8S集群外部的訪問(wèn)降铸, 默認(rèn)都是15秒超時(shí)在旱, 需要加以下配置解決:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: external-se-test
spec:
hosts:
- TargetHost
location: MESH_EXTERNAL
ports:
- number: 80
name: example-http
protocol: HTTP
resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ratings
spec:
hosts:
- TargetHost
http:
- route:
- destination:
host: TargetHost
timeout: 100s