Istio 填坑记(一)

问题: 任何启用了sidecar的服务,往外发送http请求的时候,15秒就超时。

调查发现, 对于K8S集群外部的访问, 默认都是15秒超时, 需要加以下配置解决:

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

你可能感兴趣的:(Istio 填坑记(一))