How to configure Nginx WSS running in Kubernetes

10/9/2019

I have an Nginx pod running in Kubernetes exposed as a node port service.
default.conf

server{
    listen 80;
    location / {
            proxy_pass http://ip:8080;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_set_header Host $host;
    }
}

Nginx in server:
Both ws & wss working(wss working without any ssl certificates)

Nginx inside a Pod:
ws is working wss is not working(wss giving handshake errors)

Expected result:
Both ws & wss working with nginx in kubernetes

-- AATHITH RAJENDRAN
kubernetes
nginx
websocket
ws

0 Answers