Istio-learning-note-about-Traffic Shifting(三)

istio:
If you want use the gateway api recoures "Httproute" to Traffic Shifting your app flow rate, 

Here is a yaml about Traffic Shifting within istio.

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
...
spec:
  parentRefs:
  - group: ""
    kind: Service
    name: reviews
    port: 9080
  rules:
  - backendRefs:
    - group: ""
      kind: Service
      name: reviews-v1
      port: 9080
      weight: 50
    - group: ""
      kind: Service
      name: reviews-v3
      port: 9080
      weight: 50
    matches:
    - path:
        type: PathPrefix
        value: /

the will lei flow rate %50 to service reviews-v1  and %50 to service reviews-v3.

You can refresh the website to see what happening .

And if you  service reviews-v3 is working and have no bug ,you can  lei flow rate %100 to reviews-v3.

like :

apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
...
spec:
  parentRefs:
  - group: ""
    kind: Service
    name: reviews
    port: 9080
  rules:
  - backendRefs:
    - group: ""
      kind: Service
      name: reviews-v3
      port: 9080
    matches:
    - path:
        type: PathPrefix
        value: /

相关推荐

  1. Istio-learning-note-about-Traffic Shifting(

    2024-04-09 22:00:02       41 阅读
  2. Istio-learning-note-About-Gateway API(一)

    2024-04-09 22:00:02       38 阅读
  3. Istio-learning-note-about-Fault Injection(二)

    2024-04-09 22:00:02       33 阅读
  4. Talking About Your Ideas - English Lesson Notes

    2024-04-09 22:00:02       42 阅读
  5. Reinforcement Learning学习(

    2024-04-09 22:00:02       30 阅读
  6. Statistical signal processing exam learning notes(Aalto)

    2024-04-09 22:00:02       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-09 22:00:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-09 22:00:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-09 22:00:02       82 阅读
  4. Python语言-面向对象

    2024-04-09 22:00:02       91 阅读

热门阅读

  1. 从0开始复习python~

    2024-04-09 22:00:02       31 阅读
  2. InfluxDB2的数据查询示例

    2024-04-09 22:00:02       33 阅读
  3. Redis数据倾斜

    2024-04-09 22:00:02       36 阅读
  4. [设计模式]命令模式(Command)

    2024-04-09 22:00:02       33 阅读
  5. R语言基础

    2024-04-09 22:00:02       33 阅读
  6. OneFlow深度学习框架介绍

    2024-04-09 22:00:02       29 阅读
  7. OneFlow深度学习框架介绍

    2024-04-09 22:00:02       35 阅读
  8. OneFlow深度学习框架介绍

    2024-04-09 22:00:02       30 阅读
  9. OneFlow深度学习框架介绍

    2024-04-09 22:00:02       42 阅读
  10. 探索下一代深度学习框架:OneFlow

    2024-04-09 22:00:02       37 阅读
  11. 地平线面经

    2024-04-09 22:00:02       38 阅读
  12. vue-router(路由守卫)

    2024-04-09 22:00:02       37 阅读