代码之家  ›  专栏  ›  技术社区  ›  remus

GKE入口超时值

  •  0
  • remus  · 技术社区  · 6 年前

    我想在我的web应用程序中使用WebSocket。默认情况下,每30秒重新连接一次。我尝试了以下更改超时值:

    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"
    

    在通过 kubectl 超时值保持30秒: enter image description here

    要创建后端配置,请执行以下操作: https://cloud.google.com/kubernetes-engine/docs/how-to/configure-backend-service

    超时值仍然保持在30秒不变。

    有没有办法通过.yml文件中的注释来增加超时值?我可以通过web界面编辑超时值,但我宁愿使用.yml文件。

    0 回复  |  直到 6 年前
        1
  •  0
  •   remus    6 年前

    固定的。我将我的主机及其节点升级到1.14版本,然后后端配置方法开始工作。

        2
  •  0
  •   Digil    6 年前

    这个版本似乎没有问题。

    只要GKE版本是1.11.3-GKE.18及以上版本 here ,您应该能够更新 timeoutSec 值,如 help center article .

    我通过编辑示例更改了timeoutSec值 manifest kubectl apply -f my-bsc-backendconfig.yaml “命令。