注入中断

可以通过向服务调用过程注入中断的方式,测试服务通信中断的后果

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: nginx-default-v2
  namespace: version
spec:
  hosts:
  - "hello.lizhe.com"
  gateways:
  - nginx-gateway
  http:
  - route:
    - destination:
        host: nginx-service.version.svc.cluster.local
        subset: v2
    fault:
      delay:
        fixedDelay: 1s
        percentage:
          value: 100
      abort:
        httpStatus: 500
        percentage:
          value: 50
Send a Message