【问题标题】:Does Istio not support wss?Istio 不支持 wss 吗?
【发布时间】:2022-11-03 02:00:04
【问题描述】:

虽然看了很多文章,但是好像很少有人在讨论这个问题,也没有看到任何解决方案。我想知道使用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】:

    我也遇到了同样的问题,请问你解决了吗?

    【讨论】:

    • 请不要添加我也是作为答案。它实际上并没有提供问题的答案。如果你有一个不同但相关的问题,那么ask它(如果它有助于提供上下文,请参考这个问题)。如果您对这个特定问题感兴趣,您可以upvote 它,留下comment,或者在您有足够的reputation 时启动bounty。
    猜你喜欢
    • 1970-01-01
    • 2020-04-30
    • 2017-11-07
    • 1970-01-01
    • 2012-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多