How to add websocket support for an inbound resource in Kubernetes on IBM Bluemix?

When a client tries to bind our inbound endpoint using a wss:// request, the application returns 400 bad requests, which, according to socket.io docs, are due to the lack of headers removed by load balancing proxies such as nginx.

 apiVersion: extensions/v1beta1 kind: Ingress metadata: name: my-ingress annotations: nginx.org/websocket-services: service-name spec: tls: - hosts: - www.myhost.com rules: - host: www.myhost.com http: paths: - path: / backend: serviceName: service-name servicePort: 80 

From the logs in the IBM-supplied access controller, it looks like a fork of this nginx input controller . It says that the nginx.org/websocket-services annotation adds support for websockets by adding directives to the generated nginx conf to pass the necessary headers. We tried this as described above, but to no avail.

Has anyone been successful in creating this annotation? Any workarounds to add to the generated nginx conf?

Any IBM people know if this functionality has been intentionally removed from the plug? And if there is any way to add support for websites in the Kubernetes version of IBM?

+5
source share
1 answer

Websites are not currently supported, we are working on adding it, and I will update it when it is available.

thanks

Edit: Websocket support is available in all regions, annotation for it:

  annotations: ingress.bluemix.net/websocket-services: service-name 
+5
source

Source: https://habr.com/ru/post/1269711/


All Articles