首页 > 其他分享 > istio部署demoapp应用 (十)流量镜像

istio部署demoapp应用 (十)流量镜像

时间:2022-10-26 18:03:18浏览次数:56  
标签:v1.0 istio ServerIP 0.6 demoapp 镜像 ClientIP milliseconds

virtualservice-demoapp.yaml

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: demoapp
spec:
  hosts:
  - demoapp
  http:
  - name: traffic-mirror
    route:
    - destination:
        host: demoapp
        subset: v10
    mirror:
      host: demoapp
      subset: v11

更新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 8 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 7 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-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 6 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 6 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 3 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 7 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 4 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 13 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 7 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-hq957, ServerIP: 172.20.44.206!
 - Took 6 milliseconds.
Proxying value: iKubernetes demoapp v1.0 !! ClientIP: 127.0.0.6, ServerName: demoappv10-78b6586d58-kdv4m, ServerIP: 172.20.154.195!
 - Took 6 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 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.

参考文档

https://istio.io/latest/zh/docs/reference/config/networking/virtual-service/#HTTPRoute

标签:v1.0,istio,ServerIP,0.6,demoapp,镜像,ClientIP,milliseconds
From: https://www.cnblogs.com/wangguishe/p/16829369.html

相关文章

  • istio部署demoapp应用 (八)故障注入
    故障注入故障注入有两种典型的场景delay:注入“延迟”abort:注入“中断”virtualservice-demoapp.yamlapiVersion:networking.istio.io/v1beta1kind:Virtu......
  • Istio ServiceEntry
    ServiceEntry介绍ServiceEntry用于将未能自动添加至网格中的服务,以手动形式添加至网格中,以使得网格内的自动发现机制能够访问或路由到这些服务未能自动添加至网格中的......
  • Istio gateway
    Gateway配置要点Gateway定义运行在网格边缘的负载均衡器,负责接收入站或出站的HTTP/TCP连接主要定义应该暴露到网格外部的端口、要使用的协议类型、以及SNI配置等......
  • Istio DestinationRule
    DestinationRule配置要点DestinationRule用于配置路由完成之后的应用于服务的流量策略,即配置如何将流量调度至上游端点,同时也是为VirtualService的Destination指定的目标......
  • 华为云切换操作系统使用私有镜像 安装Windows Server 2022
    趁华为云搞活动,买云服务器买一个月送一年(首单),入了一台华为云的云服务器 ps:这个活动买一送一,是二台云服务器,一台一个月和一台一年,而不是一台服务器有13个月的,领取......
  • istio部署demoapp应用 (六)基于权重的流量分割
    架构图virtualservice-demoapp.yamlapiVersion:networking.istio.io/v1beta1kind:VirtualServicemetadata:name:demoappspec:hosts:-demoapphttp:......
  • Docker 使用阿里云加速拉取官方镜像
    首先登陆阿里云容器镜像服务控制台,在左侧导航栏选择镜像工具 > 镜像加速器,在镜像加速器页面获取镜像加速地址。例如:加速器地址:[系统分配前缀].mirror.aliyuncs.com......
  • npm使用国内镜像加速的几种方法
    在使用npm过程中经常会遇到无法下载包的问题,本人在这里整理了几个npm使用国内镜像加速的方法,希望对大家有所帮助。一、修改成腾讯云镜像源1、命令npmconfigsetregist......
  • 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......