首页 > 其他分享 >Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPMatchRequest

Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPMatchRequest

时间:2023-12-12 14:15:06浏览次数:30  
标签:ratings HTTPMatchRequest VirtualService Istio header VirutalService property any

流量治理的原理 —— VirutalService —— HTTPMatchRequest

HttpMatchRequest specifies a set of criterion to be met in order for the rule to be applied to the HTTP request. For example, the following restricts the rule to match only requests where the URL path starts with /ratings/v2/ and the request contains a custom end-user header with value jason.

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: ratings-route
spec:
  hosts:
  - ratings.prod.svc.cluster.local
  http:
  - match:
    - headers:
        end-user:
          exact: jason
      uri:
        prefix: "/ratings/v2/"
      ignoreUriCase: true
    route:
    - destination:
        host: ratings.prod.svc.cluster.local

HTTPMatchRequest CANNOT be empty. Note:

  1. If a root VirtualService have matched any property (path, header etc.) by regex, delegate VirtualServices should not have any other matches on the same property.
  2. If a delegate VirtualService have matched any property (path, header etc.) by regex, root VirtualServices should not have any other matches on the same property.

  

标签:ratings,HTTPMatchRequest,VirtualService,Istio,header,VirutalService,property,any
From: https://www.cnblogs.com/zuoyang/p/17896639.html

相关文章

  • Istio从入门到精通—— 流量治理的原理 —— VirutalService —— Headers
    流量治理的原理——VirutalService——Headershttps://istio.io/latest/docs/reference/config/networking/virtual-service/#Headers MessageheaderscanbemanipulatedwhenEnvoyforwardsrequeststo,orresponsesfrom,adestinationservice.Headermani......
  • Istio从入门到精通—— 流量治理的原理 —— VirutalService —— Delegate
     流量治理的原理——VirutalService——Delegate DescribesthedelegateVirtualService.Thefollowingroutingrulesforwardthetrafficto/productpagebyadelegateVirtualServicenamedproductpage,forwardthetrafficto/reviewsbyad......
  • Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPRoute
    流量治理的原理——VirutalService——HTTPRoutehttps://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRoute DescribesmatchconditionsandactionsforroutingHTTP/1.1,HTTP2,andgRPCtraffic.SeeVirtualService......
  • Istio与Kubernetes:资源管理与协同解析
    本文分享自华为云社区《istio资源介绍以及和kubernetes资源扭转关系》,作者:可以交个朋友。一、istio原理Istio的原理是拦截Kubernetes中创建Pod的事件,然后向Pod中注入一个包含Envoy的容器,进出Pod的流量会被“劫持”到Envoy进行处理。由于流量被“劫持”了,所以Istio......
  • Istio从入门到精通—— 流量治理的原理 —— 故障注入
     流量治理的原理——故障注入一、故障注入的概念 流量治理的原理中的故障注入是一种重要的技术手段,用于评估和提升系统的可靠性。其基本原理是在系统正常运行时,人为地引入一些故障,以测试系统的健壮性和容错能力。通过这种方式,我们可以发现并解决系统中可能存在的问题,从而确......
  • Istio 入门(六):版本控制
    目录VirtualService和DestinationRuleVirtualService与Service的关系VirtualService和DestinationRule的关系VirtualService的定义DestinationRule的定义完整系统教程电子书阅读地址:https://istio.whuanle.cn/VirtualService和DestinationRuleVirtualService与Serv......
  • k8s之istio
    .Istio介绍Istio是一个开源的服务网格(ServiceMesh),为Kubernetes和其他平台上的微服务架构提供了一种统一的、灵活的网络通信和管理方式。具有服务发现、负载均衡、流量管理、故障恢复和安全性等功能。以下是Istio的一些基本特性:代理注入:Istio使用Envoy作为其数据面代理,通过注入......
  • 云原生周刊:Istio 1.20.0 发布 | 2023.11.20
    开源项目推荐DevPodDevPod是一款纯客户端工具,可在任何后端基于devcontainer.json创建可重现的开发人员环境。每个开发者环境都在一个容器中运行,并通过devcontainer.json进行指定。通过DevPod提供商,这些环境可以在任何后端创建,如本地计算机、Kubernetes集群、任何可访问......
  • Istio从入门到精通—— Istio 的主要组件
    Istio的主要组件 Istio主要由控制面组件和数据面组件组成。Istio1.20.0(https://github.com/istio/istio/releases/download/1.20.0/istio-1.20.0-linux-arm64.tar.gz)默认安装的组件如下:EnvoySidecarproxiespermicroservicetohandleingress/egres......
  • Istio从入门到精通——Istio 能做什么?
    Istio能做什么? 下面通过一个天气预报应用展示Istio的服务访问形式。其中有两个服务:forecast和recommendation。forecast由Node.js开发而成,recommendation由Java开发而成。这两个服务之间通过最简单的服务名进行调用,在代码中只实现最简单的业务处理,不包含额外的服务......