Coder templates create fail

I deploy coder in kubernetes but appear error when I create a template, please help, thx
No description
8 Replies
kyle
kyle3y ago
Is your deployment in front of a proxy?
kimke5
kimke5OP3y ago
yes, I have a proxy
kyle
kyle3y ago
I don't think your proxy is forwarding WebSocket's properly.
kimke5
kimke5OP3y ago
I am using ingress nginx deployed on k8s @kyle How can i fix it ?
Scott
Scott3y ago
@kimke5 - You have to figure out how to upgrade the ingress to allow for websockets. https://github.com/nginxinc/kubernetes-ingress/tree/v2.4.2/examples/ingress-resources/websocket
Tom Thomson
Tom Thomson3y ago
For me it was an issue with http version 1.0. Web sockets don't support 1.0. In the nginx configuration add the following in your location block:
location / {
...
proxy_http_version 1.1;
...
}
location / {
...
proxy_http_version 1.1;
...
}
Cian
Cian3y ago
You may also need to add
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
Codercord
Codercord3y ago
Marked the thread as resolved.

Did you find this page helpful?