Kubernetes 中如何进行 AB 测试
資深大佬 : idblife 3
单个服务很好理解。
现在是有 100 个服务,
每个服务都有 AB 两个版本,
如何实现 A 版本的只访问 A 版本的服务呢?
现在是有 100 个服务,
每个服务都有 AB 两个版本,
如何实现 A 版本的只访问 A 版本的服务呢?
大佬有話說 (11)
Headers.HeaderOperations
Overwrite the headers specified by key with the given values
Append the given values to the headers specified by keys (will create a comma-separated list of values)
Remove a the specified headers
具体可以参考 bookinfo/networking 下的配置文件,这是其中一个例子
https://istio.io/latest/docs/tasks/traffic-management/request-routing/#route-based-on-user-identity
然后用 k8s 的方式直接调用
https://stackoverflow.com/questions/53095459/invoke-a-service-from-a-multi-container-pod-with-a-istio-sidecar
新项目用起来很方便,如果是老项目还是在已有框架的基础上修改吧。