首页 > 其他分享 >virtualservice权重

virtualservice权重

时间:2022-08-22 15:59:14浏览次数:73  
标签:subset virtualservice 权重 weight demoapp routing based

应用virtualservice

[root@k8s-master 06-weight-based-routing]# kubectl apply -f virtualservice-demoapp.yaml 
[root@k8s-master 06-weight-based-routing]# cat 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
while true; do curl demoapp:8080; sleep 0.$RANDOM; done

可以看到基本是按照9/1进行分配的

也直接vim直接修改VS,然后apply一下,就能在线修改权重了

 

标签:subset,virtualservice,权重,weight,demoapp,routing,based
From: https://www.cnblogs.com/zyyang1993/p/16613022.html

相关文章

  • 神经网络权重初始化方法He、Xavier初始化
     He初始化是何凯明等提出的一种鲁棒的神经网络参数初始化方法,动机同Xaviar初始化基本一致,都是为了保证信息在前向传播和反向传播过程中能够有效流动,使不同层的输入信号的......