I'd like to use websockets in my web application. Right now my websocket disconnects and reconnects every 30 seconds, which is the default timeout in GKE Ingress. I tried the following to change timeout values:
metadata:
name: my-ingress
annotations:
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.org/proxy-connect-timeout: "300"
nginx.org/proxy-read-timeout: "3600"
nginx.org/proxy-send-timeout: "3600"
After recreating the ingress through kubectl
the timeout value remains 30 seconds:
I also tried to create a backend configuration as described here: https://cloud.google.com/kubernetes-engine/docs/how-to/configure-backend-service
The timeout value still remained unchanged at 30 seconds.
Is there a way to increase timeout value through annotations in .yml file? I could edit the timeout value through the web interface but I'd rather use .yml files.
Fixed. I upgraded my master and its nodes to version 1.14 and then the backend config approach worked.
This doesn't seems like an issue with the version.
As long as the GKE version is 1.11.3-gke.18 and above as mentioned here, you should be able to update the timeoutSec value by configuring the 'BackendConfig' as explained in the help center article.
I changed the timeoutSec value by editing the example manifest and then updating the BackendConfig (in my GKE 1.13.11-gke.14 cluster) using "kubectl apply -f my-bsc-backendconfig.yaml
" command.