Kubernetes-ingress: Support for websockets?

Created on 29 Mar 2016  路  2Comments  路  Source: nginxinc/kubernetes-ingress

a standard location would be fine, like /ws.

Most helpful comment

Thx for submitting

I think a better option could be to support websockets via annotations:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ws-ingress
  annotations:
    websockets-delim: " "
    websockets: "/wsapp /ws"
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: "/ws"
        backend:
          serviceName: tea-svc
          servicePort: 8080
      - path: /coffee
        backend:
          serviceName: coffee-svc
          servicePort: 80
      - path: /wsapp
        backend:
          serviceName: soda-svc
          servicePort: 80

This way we can have multiple websockets paths

All 2 comments

Thx for submitting

I think a better option could be to support websockets via annotations:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ws-ingress
  annotations:
    websockets-delim: " "
    websockets: "/wsapp /ws"
spec:
  rules:
  - host: myapp.example.com
    http:
      paths:
      - path: "/ws"
        backend:
          serviceName: tea-svc
          servicePort: 8080
      - path: /coffee
        backend:
          serviceName: coffee-svc
          servicePort: 80
      - path: /wsapp
        backend:
          serviceName: soda-svc
          servicePort: 80

This way we can have multiple websockets paths

The websocket path should be able to use the same service as regular path too

Was this page helpful?
0 / 5 - 0 ratings