nginx - GCE 上的 Kubernetes : Ingress Timeout Configuration

标签 nginx kubernetes google-cloud-platform google-compute-engine load-balancing

我在 Google Compute Engine (GCE) 上运行 Kubernetes。我有一个 Ingress 设置。一切正常,除了当我上传大文件时,L7 HTTPS 负载均衡器会在 30 秒后终止连接。我知道我可以在“后端服务”中手动提高它,但我想知道是否有办法从 Ingress 规范中做到这一点。我担心我的手动调整稍后会改回 30 秒。

nginx 入口 Controller 有许多可用于配置 nginx 的注解。 GCE L7 负载均衡器是否有类似的东西?

最佳答案

现在可以使用自定义资源在 GKE 中进行配置 BackendConfig .

apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: my-bconfig
spec:
  timeoutSec: 60

然后配置您的 Service将此配置与注释一起使用:
apiVersion: v1
kind: Service
metadata:
  name: my-service
  annotations:
    beta.cloud.google.com/backend-config: '{"ports": {"80":"my-bconfig"}}'
spec:
  ports:
  - port: 80
  .... other fields

Configuring a backend service through Ingress

关于nginx - GCE 上的 Kubernetes : Ingress Timeout Configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44601191/

相关文章:

HTTP 444(无响应)而不是 404、403 错误页面?

kubernetes - 如何在prometheus-operator中监控外部服务

python - 带有 GKE 的 GCS,403 写入 GCS 存储桶的权限不足

python - Google 语音 API GRPC 超时

ruby-on-rails - 我应该为我的 Rails 应用程序使用 Apache 还是 Nginx &Passenger 或 Mongrel

nginx - 在 nginx 中提供静态网站,静态文件的路径错误

ruby-on-rails - 如何停止 rails nginx-passenger 应用程序?

oracle - Kubernetes反复提取图像并停留在容器创建上

docker - 将所有服务端口转发到单个容器

google-cloud-platform - Google Cloud Shell 不断断开连接