We are migrating our documentserver to kubernetes. The setup has gone fairly smoothly using the guide at https://github.com/ONLYOFFICE/Kubernetes-Docs?tab=readme-ov-file#51-example-deployment-optional. But when testing with the “example” server, I’m seeing websocket connection failures in the Network tab of browser inspector.
I have configured helm values with ingress.enabled: true
to use the existing ingress-nginx controller in the cluster.
I was able to get websocket connections working with the following annotation:
nginx.ingress.kubernetes.io/server-snippet: |
location /8.1.3-4/doc {
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
}
But that config breaks regular http(s) connections.
I’ve looked at the examples at https://github.com/ONLYOFFICE/document-server-proxy/blob/feature/virtual-path/nginx/proxy-to-virtual-path.conf but those appear to be for configuring nginx directly, not via annotations for the nginx controller in a cluster.
We are using the enterprise version of the container images.
Do you have examples for getting docservice to work using ingress-nginx controller in a kubes cluster?