首页 > 其他分享 >istio部署demoapp应用 (六)基于权重的流量分割

istio部署demoapp应用 (六)基于权重的流量分割

时间:2022-10-26 14:58:59浏览次数:64  
标签:分割 127.0 v1.0 istio ServerIP demoapp ClientIP milliseconds

架构图

virtualservice-demoapp.yaml

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: demoapp
spec:
  hosts:
  - demoapp
  http:
  - name: weight-based-routing
    route:
    - destination:
        host: demoapp
        subset: v10
      weight: 90
    - destination:
        host: demoapp
        subset: v11
      weight: 10

更新demoapp vs

# kubectl apply -f virtualservice-demoapp.yaml 
virtualservice.networking.istio.io/demoapp configured

访问demoapp

~# while true;do curl app.wgs.com; sleep 0.5;done
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 4 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 4 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 4 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 5 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 5 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 4 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 4 milliseconds.

查看kiali

 

标签:分割,127.0,v1.0,istio,ServerIP,demoapp,ClientIP,milliseconds
From: https://www.cnblogs.com/wangguishe/p/16828293.html

相关文章

  • pytorch+Unet图像分割:将图片中的盐体找出来
    向AI转型的程序员都关注了这个号????????????机器学习AI算法工程  公众号:datayx 什么是图像分割问题呢?简单的来讲就是给一张图像,检测是用框出框出物体,而图像分割分出一......
  • [Java]String.split()分割字符串总结
    publicString[]split(Stringregex)publicString[]split(Stringregex,intlimit)regex代表正则表达式limit参数limit>0:最多匹配limit-1次,得到长为limit的数组,......
  • istio部署demoapp应用 (四) Ingress-gateway暴露demoapp
    proxy-gateway.yamlapiVersion:networking.istio.io/v1beta1kind:Gatewaymetadata:name:proxy-gatewaynamespace:istio-systemspec:selector:app:i......
  • istio部署demoapp多版本应用示例
    环境说明frontend(proxy):前端应用,会请求后端的demoappservice:proxydemoapp:后端应用同时部署两个版本 部署demoappv1.0deploy-demoapp-v10.yamla......
  • 分割矩阵 (二分范围[L,R))
       分割矩阵            (browine.c/cpp/pas)【问题描述】   有N*M的一个非负整数矩阵。现在要把矩阵分成A*B块。矩阵先水平地切A-1刀,把矩阵划分......
  • 915. 分割数组
    题目描述给一个数组nums,需要把他换分为两个连续的子数组,要求是两个子数组非空,且左边的每个元素都小于等于右边每个元素,左边数组长度尽可能小求left的长度f1-模拟+2次遍......
  • Leetcode第915题:分割数组(Partrition Array Into Disjoint Intervals)
    解题思路最终的是将一个数组分为两个数组:左数组和右数组。这两个数组满足:左数组的最大值小于右数组的任何值。需要一个变量left_max来记录左数组的最大值。左数组长度......
  • 915. 分割数组
    915.分割数组给定一个数组 nums ,将其划分为两个连续子数left 和 right, 使得:left 中的每个元素都小于或等于 right 中的每个元素。left和 right 都是非空......
  • 多重循环~平面分割
    题目描述:输入第一行输入一个整数m(m<=100),表示有m组测试数据。接下来的m行,每行有两个整数n和p,分别表示平面内的直线数和相交于一点直线数。 输出每组测试数据输出......
  • Envoy 流量分割
    流量分割HTTProuter过滤器支持在一个路由中指定多个上游具有权重属性的集群,而后将流量基于权重调度至此些集群其中之一;类似流量迁移,流量分割中,分配给每个集群的权重也可以......