Istio不支持wss吗?

问题描述 投票:0回答:1

虽然我看过很多文章,但似乎很少有人讨论这个问题,也没有看到任何解决方案。我想知道使用Istio作为入口后是否不支持wss?根据我的测试,看起来wss确实无法在istio上运行,但是ws正常,gateway & virtualservice我做了以下测试。

希望有人能和我讨论这个问题,即使事实证明 Istio 不支持 wss,谢谢!

1.使用tls.mode:PASSTHROUGH

---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: test-ws-gw
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    tls:
      mode: PASSTHROUGH
    hosts:
    - "test.ws.com"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: test-ws-vs
  namespace: ws-test
spec:
  hosts:
  - test.ws.com
  gateways:
  - istio-system/test-ws-gw
  tls:
    - match:
        - port: 443
          sniHosts:
            - "test.ws.com"
      route:
        - destination:
            port:
              number: 9400
            host: ws-svc.ws-test.svc.cluster.local
  1. 使用tls.mode:简单
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: test-ws-gw
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    tls:
      mode: SIMPLE
      credentialName: ingress-cert-ws
    hosts:
    - "*"

---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: test-ws-vs
spec:
  hosts:
  - "test.ws.com"
  gateways:
  - test-ws-gw
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        port:
          number: 9400
        host: ws-svc.ws-test.svc.cluster.local
websocket istio istio-gateway
1个回答
0
投票

关于 Istio 上的 wss 有什么消息吗?它开始对你起作用了吗?我在 1.8.1 上也遇到同样的问题

© www.soinside.com 2019 - 2024. All rights reserved.