【发布时间】:2020-06-05 15:16:25
【问题描述】:
Ingress 网关位于 AWS ELB(classic) 后面,使用 nodeport,我想根据客户端 IP 在虚拟服务中路由 TCP 流量。
当然开启了ELB的代理协议。
当我使用 HTTP 时,它可以工作。配置如下。
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: app-vservice
namespace: test
spec:
hosts:
- "app-service"
http:
- match:
- headers:
x-forwarded-for:
exact: 123.123.123.123
route:
- destination:
host: app-service
subset: v2
- route:
- destination:
host: app-service
subset: v1
但是我在官方文档中找不到 TCP 路由的 headers 字段。
不可能吗?
谢谢。
【问题讨论】:
标签: kubernetes istio