【发布时间】:2019-12-13 12:33:20
【问题描述】:
我想在我的 Web 应用程序中使用 websocket。现在我的 websocket 每 30 秒断开连接并重新连接,这是 GKE Ingress 中的默认超时。我尝试了以下方法来更改超时值:
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"
我还尝试按照此处所述创建后端配置:https://cloud.google.com/kubernetes-engine/docs/how-to/configure-backend-service
超时值仍然保持不变,为 30 秒。
有没有办法通过 .yml 文件中的注释来增加超时值?我可以通过 Web 界面编辑超时值,但我更愿意使用 .yml 文件。
【问题讨论】:
标签: websocket google-kubernetes-engine kubernetes-ingress