최대 1 분 소요

Prefix Routing

  • prefix를 가지고 라우팅을 핸들링 할 수 있다.

  • prefix routing을 적용할려면 관련 애플리케이션이 지원을 해줘야 한다.
  • 시험버전을 구분해서 라우팅한다면 지양한다. 서브도메인 추천
kind: VirtualService
apiVersion: networking.istio.io/v1alpha3
metadata:
  name: fleetman-webapp
  namespace: default
spec:
  hosts: # which incoming host are we applying the proxy rules to???
    - "*"
  gateways:
    - ingress-gateway-configuration
  http:
    - match:
        - uri: # IF
            prefix: "/experimental"
        - uri: # OR
            prefix: "/canary"
      route: # THEN
        - destination:
            host: fleetman-webapp
            subset: experimental
    - match:
        - uri:
            prefix: "/"
      route:
        - destination:
            host: fleetman-webapp
            subset: original

이스티오문서

Subdomain Routing

istio-ingressgateway를 타야된다.

실험: experimental.fleetman.com

일반: fleetman.com

---
kind: VirtualService
apiVersion: networking.istio.io/v1alpha3
metadata:
  name: fleetman-webapp
  namespace: default
spec:
  hosts: # which incoming host are we applying the proxy rules to???
    - "fleetman.com"
  gateways:
    - ingress-gateway-configuration
  http:
    - route:
        - destination:
            host: fleetman-webapp
            subset: original
---
kind: VirtualService
apiVersion: networking.istio.io/v1alpha3
metadata:
  name: fleetman-webapp-experiment
  namespace: default
spec:
  hosts: # which incoming host are we applying the proxy rules to???
    - "experimental.fleetman.com"
  gateways:
    - ingress-gateway-configuration
  http:
    - route:
        - destination:
            host: fleetman-webapp
            subset: experimental

Fault Injection

kind: VirtualService
apiVersion: networking.istio.io/v1alpha3
metadata:
  name: fleetman-vehicle-telemetry
  namespace: default
spec:
  hosts:
    - fleetman-vehicle-telemetry
  http:
    - fault:
        abort:
          httpStatus: 503
          percentage:
            value: 100
      route:
        - destination:
            host: fleetman-vehicle-telemetry

태그:

카테고리:

업데이트:

댓글남기기