![](/img/trans.png)
[英]Istio with GKE on GCP : impossible to redirect TCP stream other than 80 and 443
[英]Istio virtual service not working for port other than 80 and 443
我正在尝试与gateway
一起设置istio
虚拟服务,但不知何故它不起作用。
这是我的网关配置
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: nginx-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
name: admin
number: 9999
protocol: HTTP
hosts:
- nginx.example.com
虚拟服务
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: nginx-virtualservice
spec:
gateways:
- nginx-gateway
hosts:
- nginx.example.com
http:
- match:
- port: 9999
route:
- destination:
host: nginx
port:
number: 80
但是,它仅适用于端口80
和 `443,但不适用于其他端口。
很可能,当您创建 istio-ingressgateway 时,您使用了默认值,因此仅打开端口 80 和 443。 查看ingressgateway service/deployment,打开9999端口,在operator中添加即可。 现在您的网关正在侦听端口 9999,但 go 流量可能无法通过它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.