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: /
相关推荐
nuo5342022 小时前
基础 3 —— Docker 的常用命令
docker·容器
oushaojun23 小时前
deepseek教我什么是docker
运维·docker·容器
jieyucx3 小时前
Windows11 & Linux 环境Docker部署与镜像拉取效率优化实战指南
linux·运维·docker
从此以后自律3 小时前
项目 Docker + Nginx 云端完整部署细节
nginx·docker·容器
donoot20 小时前
一次 Nginx 502 问题的深度排查:从 SELinux 到容器网络
nginx·docker·selinux·反向代理·502 bad gateway
Sagittarius_A*1 天前
Docker:渗透前置容器化核心基础
运维·安全·docker·容器
名字还没想好☜1 天前
Docker 多阶段构建:把镜像从 1.2GB 砍到 15MB
运维·docker·容器·多阶段构建·镜像优化
生活爱好者!1 天前
NAS还能玩游戏?部署一款 WebGL 3D 赛车小游戏
游戏·docker·容器·玩游戏
曦月合一1 天前
本地电脑部署docker,及各种组件(nginx、mysql、redis、mongo、minio、java)
docker·windows10 专业版
hj2862511 天前
Docker 核心知识点整理(网络 + Dockerfile + 原理 + 命令)
网络·docker·容器