WebSocket Connectivity Changes
Glass UI receives live data from NATS over a browser WebSocket connection. Starting with this release, that connection runs through the same origin as the UI itself, at the /ws path. This article explains what changed and what to update when upgrading a 1.0.0 deployment.
What changed
In 1.0.0, the browser connected to a dedicated NATS WebSocket endpoint on a separate port. The UI fetched the endpoint URL from a generated /config/nats.json file, and the URL had to match whatever hostname your browser used to reach the UI. In practice this meant:
- a second exposed port (NodePort
31222by default) with its own firewall rule, - a
ui.config.nats.serverUrloverride for every non-ingress access method, - a hard-to-debug failure mode where the UI loaded but showed no data whenever the configured URL did not match the browser's address bar.
Now, the nginx server inside the glass-ui pod proxies WebSocket connections: the browser connects to ws(s)://<ui-host>/ws, nginx rewrites the path and forwards the connection to the NATS ClusterIP service inside the cluster. The WebSocket URL is derived from window.location — whatever address works for the UI automatically works for the data connection.
| Text Only | |
|---|---|
As a consequence:
- The
glass-nats-websocketNodePort/LoadBalancer service no longer exists, and thenats.websocketHelm values are rejected by the chart schema. - The
/config/nats.jsonfile and theui.config.nats.serverUrlvalue are gone; setting them has no effect. - Only the UI port needs to be reachable from browsers.
Migrating your deployment
No values changes are required: /ws is served by the same ingress host that already routes to the UI.
If you previously set ui.config.nats.serverUrl (or relied on the chart computing a wss://<host>:<port> URL from your ingress hostname), simply remove the override. TLS for the WebSocket is terminated by your ingress controller together with the rest of the UI traffic.
Remove the --set "ui.config.nats.serverUrl=ws://localhost:8222" override from your install command, and drop the second port-forward to glass-nats. A single forward now carries both the UI and the WebSocket:
| Bash | |
|---|---|
The updated port-forward overlay looks like this:
Remove the --set "ui.config.nats.serverUrl=ws://${NODE_IP}:31222" override from your install command, and close any firewall rule for the old WebSocket NodePort (31222 by default). The browser reaches the WebSocket through the same NodePort as the UI.
The updated NodePort overlay looks like this:
No dedicated WebSocket endpoint
There is no option to re-enable the old dedicated WebSocket NodePort. Anything that connected to NATS through that port directly must connect via /ws on the UI origin instead, or port-forward the glass-nats service for ad-hoc access.
TLS without an ingress controller
The nginx proxy also closes a gap for NodePort and LoadBalancer deployments: it can terminate TLS itself, which previously required an ingress controller.
When globalIngress.enabled: false and TLS is enabled (globalTls.enabled: true or ui.ingress.tls.enabled: true), nginx serves HTTPS on port 8443 using the certificate from globalTls.secretName and redirects plain HTTP to HTTPS. For NodePort deployments, expose the HTTPS port via ui.service.httpsNodePort. The WebSocket at /ws is covered by the same certificate — no separate TLS configuration exists for NATS WebSocket traffic anymore.
See HTTPS with and without an ingress controller for the full reference.
Troubleshooting
If the UI loads but no clusters appear, the /ws connection is failing:
- Open the browser developer tools, Network tab, filter by WS, and reload. The request to
/wsshould upgrade to a WebSocket connection (HTTP 101). - If the upgrade fails, check the nginx upstream: the
nats.proxyUpstreamvalue (defaultglass-nats:8080) must match the NATS service name and WebSocket port in the Glass UI namespace. - Check the glass-ui pod logs for proxy errors:
kubectl logs deployment/glass-ui -n controlplane.