Search code examples
kuberneteswebsocketnginx-ingress

kubernetes nginx.ingress multiple websocket services


How I can specify more that one service for the nginx ingress websocket annotation?

nginx.ingress.kubernetes.io/websocket-services: "service-name"

the name implies more that one service can be supplied?


Solution

  • NGINX Ingress WebSocket support page says:

    To load balance a WebSocket application with NGINX Ingress controllers, you need to add the nginx.org/websocket-services(you use nginx.ingress.kubernetes.io) annotation to your Ingress resource definition. The annotation specifies which services are websocket services. The annotation syntax is as follows:

    nginx.org/websocket-services: "service1[,service2,...]"
    

    So nginx.org/websocket-services: "service-name,service-name1,..,service-nameN"