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: /
相关推荐
Alsn862 天前
等待学习-学习目录:Docker 容器安全攻防
学习·安全·docker
程序员老赵2 天前
服务器没有桌面?Docker 跑个 Chrome,浏览器就能远程用
docker·容器·devops
杨浦老苏2 天前
轻量级Docker仪表板Servedash
运维·docker·监控·群晖·仪表板
正经教主2 天前
【docker基础】 第八周:容器监控与应用更新策略
运维·docker·容器
kiros_wang2 天前
Docker 使用完整指南
运维·docker·容器
正经教主2 天前
【docker基础】第九周:Docker安全与镜像优化
运维·docker·容器
CodeStats3 天前
【虚拟机】 从 CPU 指令到虚拟机隔离:虚拟机就是一个“模拟了完整硬件的普通进程”
java·docker
ai产品老杨3 天前
突破安防碎片化:基于 Docker 与边缘计算的 AI 视频智能化中台,如何通过 GB28181/RTSP 统一接入与全套源码交付实现二次开发自由?
人工智能·docker·边缘计算
正经教主3 天前
【docker基础】第十三周:学习总结与进阶方向【完结】
运维·docker·容器
“码”力全开3 天前
解耦异构设备:基于 Docker 与边缘计算的 GB28181/RTSP 统一流媒体平台架构演进(全源码交付)
docker·架构·边缘计算