New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] REVERSE_PROXY_WS not working in KUBERNETES_MODE #1125
Comments
Hi @ANBAL534, thank you for opening this issue. Do you have any scheduler/bunkerweb logs that could help us investigate as well on this ? Thank you |
logs.log In the DB the setting is picked correctly, but doesnt translates in the the correct nginx configuration: |
Hello @ANBAL534, Can you try to rename your annotation |
Closing this as it should do the trick. Don't hesitate to open a new issue if needed. |
Indeed, that solved the issue. But in the documentation it didnt specified the necessity of such modification to the annotation. Are there other settings that requires this? |
What happened?
Websockets are not working in kubernetes mode of bunkerweb. Calls towards webockets endpoints gets a 426 Upgrade Required.
I noticed this when setting up a home assistant server in my local kubernetes cluster running on k3s in x86_64 servers (good old trusty proliants)
It is reproducible on baremetal, in a simple k3d for testing and it is not reproducible on a regular docker compose deployment of bunkerweb.
How to reproduce?
I managed to reproduce with versions 1.5.6, 1.5.5, 1.5.4, I have not tested with older versions.
You can use k3d to create a simple testing kubernetes cluster, remember to disable traefik:
k3d cluster create -p "80:80@loadbalancer" -p "443:443@loadbalancer" -s 1 --k3s-arg "--disable=traefik@server:*" --wait
kubectl apply -f bunkerweb.yaml
kubectl apply -f wstest.yaml
4.1.
websocat ws://wstest.127.0.0.1.nip.io/
4.2.
curl -i -N -H 'Connection: "Upgrade"' -H "Upgrade: websocket" -H "Host: wstest.127.0.0.1.nip.io" http://wstest.127.0.0.1.nip.io/
To compare with the regular docker compose deployment, you can
docker compose up
my provided docker-compose.yaml file by only changing the proxy host target IP to where the websocket server is running (ex.: your local PC IP)Then execute the websocket server locally with docker:
docker run -p 3000:3000 elegantmonkeys/websockets-demo
And test with websocat:
websocat ws://127.0.0.1:3000
You will be able to see that the websocket server from k8s will return a 426 where the one going through regular docker compose works as intended.
Configuration file(s) (yaml or .env)
Relevant log output
BunkerWeb version
1.5.6
What integration are you using?
Kubernetes
Linux distribution (if applicable)
Almalinux 9.3
Removed private data
Code of Conduct
The text was updated successfully, but these errors were encountered: