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: /
相关推荐
吴声子夜歌33 分钟前
Docker入门与实战——Docker命令查询
docker·容器
handonch1 小时前
金仓 KingbaseES 时区问题根治指南:从「总是差 8 小时」到全链路统一
linux·docker·postgresql·信创
吴声子夜歌2 小时前
Docker入门与实战——常见问题总结
运维·docker·容器
马立杰4 小时前
Docker Build 编译补丁版 PHP7.4 FPM 容器镜像教程(CVE-2026-109618 CVE-2026-109619)
运维·docker·容器·php
tedcloud1234 小时前
Docker Compose 部署 Memos:从安装到备份恢复
linux·开发语言·jvm·后端·docker·容器·rust
无人生还别怕5 小时前
如何搭建k8s服务(docker部署)
linux·运维·docker·云原生·容器·kubernetes·openanolisos
*星星之火*6 小时前
【无标题】
docker·gcp·gke
姜鱼问生6 小时前
报数据库连不上?Docker Compose 启动顺序假象:depends_on 不是万能的!
数据库·docker·容器
Vex2une6 小时前
WSL2 Docker开发环境:2026年容器化编程性能调优指南
docker·开发环境·wsl2·容器化开发·virtiofs·dev drive·gpu直通
我滴老baby6 小时前
自建服务20个,书签300条?我用一个Docker容器做了个“服务启动台”,手机也能打开
运维·docker·容器