简体   繁体   English

从 Kubernetes 集群内部进行 Canary 流量管理

[英]Canary traffic management from within Kubernetes cluster

I'm trying to achieve canary-style traffic management for applications which are not yet part of the Istio service-mesh but still are in the same k8s cluster.我正在尝试为尚不属于 Istio 服务网格但仍在同一个 k8s 集群中的应用程序实现金丝雀式的流量管理。 For example:例如:

Pod A in the namespace non-mesh calls Service B in namespace mesh which is bound to the pods inside the service mesh.命名空间non-mesh中的Pod A 调用命名空间网格中的Service B,命名空间mesh绑定到服务网格内的 pod。 A desired state would be when traffic to these pods is distributed by the rules described in related VirtualService object.所需的 state 将是当通过相关VirtualService object 中描述的规则分配到这些 pod 的流量时。

Is this possible by Istio's native facilities?这可以通过 Istio 的原生设施实现吗?

In Istio a VirtualService Objects inserts a Route rule inside the service mesh sidecars.在 Istio 中, VirtualService Objects 在服务网格边车中插入了一个 Route 规则。 These routes rules are evaluated on the client-side (In your case that would be the sidecar associated with Service A if there was a sidecar present with it).这些路由规则在客户端进行评估(在您的情况下,如果存在与Service A相关的边车,则它是与服务 A 关联的边车)。 Due to this, you can't perform traffic management between Service A to Service B ( As there is no client sidecar).因此,您无法在Service AService B之间执行流量管理(因为没有客户端边车)。 One possible method to solve this, in case you don't want to enable mesh for the entire non-mesh namespace is to only insert sidecars for Service A .如果您不想为整个non-mesh命名空间启用网格,解决此问题的一种可能方法是只为Service A插入边车。 This will create all the necessary rules in the sidecar and then you can use traffic weights to modify requests between Service A and Service B这将在 sidecar 中创建所有必要的规则,然后您可以使用流量权重来修改服务 A 和服务 B 之间的请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM