Do you have any solution or docs to expose rancher...
# general
c
Do you have any solution or docs to expose rancher via kubevip but via a reverse proxy (nginx) that sends to the kubevip ip ?
currently getting some errors:
Copy code
2025/05/12 17:06:00 [ERROR] Error during subscribe websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
2025/05/12 17:06:01 [ERROR] Error during subscribe websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
and also :
Copy code
2025/05/12 17:05:56 [ERROR] Failed to handle tunnel request from remote address 10.151.5.135:40274 (X-Forwarded-For: 10.151.2.115): response 400: websocket: the client is not using the
b
Based on the error, this is a suggestion I found: That Rancher log means one of your reverse-proxy hops stripped out the WebSocket-upgrade headers. Rancher’s /v3/subscribe (and several UI features) open a WebSocket; if Connection: upgrade and Upgrade: websocket don’t reach the Rancher pod, the API drops the connection and you get that. Check Nginx config:
Copy code
server {
    listen 443 ssl;
    server_name <http://rancher.example.com|rancher.example.com>;

    ssl_certificate     /etc/nginx/certs/fullchain.pem;
    ssl_certificate_key /etc/nginx/certs/privkey.pem;

    # ---- WebSocket-safe settings ----
    proxy_http_version  1.1;                     # <- keep-alive & upgrade
    proxy_set_header    Upgrade $http_upgrade;   # <- pass Upgrade header
    proxy_set_header    Connection "upgrade";    # <- force 'upgrade' token
    proxy_read_timeout  900s;                    # <- rancher streams for a long time

    proxy_set_header Host              $host;
    proxy_set_header X-Real-IP         $remote_addr;
    proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;

    location / {
        proxy_pass <https://10.0.40.20>;           # kube-vip VIP
    }
}