【发布时间】:2017-11-01 13:25:34
【问题描述】:
所以这是我的问题,我想在 Kubernetes 入口资源 3 中设置超时参数。 Kubernetes 文档中描述的方法是使用入口资源注释或 ConfigMap。在下面的示例中,我尝试使用注释,但由于未知原因,更改没有生效。
nginx.org/proxy-connect-timeout: 10s
nginx.org/proxy-read-timeout: 10s
nginx.org/proxy-send-timeout: 10s
我正在我的入口资源定义中设置这些参数:
kind: Ingress
metadata:
name: my-foobar-ingress
namespace: foobar
annotations:
nginx.org/proxy-send-timeout: "10s"
nginx.org/proxy-connect-timeout: "10s"
nginx.org/proxy-read-timeout: "10s"
spec:
rules:
- host: foobar.foo.bar
http:
paths:
- backend:
serviceName: foobar-svc
servicePort: 8080
path: /
另一种设置 nginx 配置的方法是通过 ConfigMap,但我不想在全局范围内这样做,所以我需要使用注解来这样做。
【问题讨论】:
标签: nginx kubernetes