在 nginx 入口控制器中传递 websockets 和超时值
Pass websockets and timeout values in nginx ingress controller
我想在我的 nginx
入口控制器部署中配置以下设置
proxy_socket_keepalive -> on
proxy_read_timeout -> 3600
proxy_write_timeout ->3600
但是我无法找到它们 annotations
here, although they appear in the list of available nginx
directives.
这是为什么?
没有proxy_write_timeout
。我假设你的意思是 proxy_send_timeout.
两者:
nginx.ingress.kubernetes.io/proxy-send-timeout
和:
nginx.ingress.kubernetes.io/proxy-read-timeout
至于proxy_socket_keepalive
,不幸的是,这个选项不能通过注释来设置。您可能希望将其嵌套在 Nginx 配置中,例如:
location / {
client_max_body_size 128M;
proxy_buffer_size 256k;
proxy_buffers 4 512k;
proxy_busy_buffers_size 512k;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_socket_keepalive on;
我想在我的 nginx
入口控制器部署中配置以下设置
proxy_socket_keepalive -> on
proxy_read_timeout -> 3600
proxy_write_timeout ->3600
但是我无法找到它们 annotations
here, although they appear in the list of available nginx
directives.
这是为什么?
没有proxy_write_timeout
。我假设你的意思是 proxy_send_timeout.
两者:
nginx.ingress.kubernetes.io/proxy-send-timeout
和:
nginx.ingress.kubernetes.io/proxy-read-timeout
至于proxy_socket_keepalive
,不幸的是,这个选项不能通过注释来设置。您可能希望将其嵌套在 Nginx 配置中,例如:
location / {
client_max_body_size 128M;
proxy_buffer_size 256k;
proxy_buffers 4 512k;
proxy_busy_buffers_size 512k;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_socket_keepalive on;