<p>I've tried to change the default proxy_timeout(600s) to 3600s for tcp services in k8s maintained nginx-ingress.But its not working.</p>
<p>I have exec the nginx-controller pods and got the following in nginx.conf.</p>
<pre><code># TCP services

server {
        preread_by_lua_block {
                ngx.var.proxy_upstream_name=&quot;tcp-test-test-db-test-lb-dev-7687&quot;;
        }

        listen                  7687;

        proxy_timeout           600s;
        proxy_pass              upstream_balancer;

}
</code></pre>
<p>i have used following configmap and found not working.I'm getting still 600s timeout.</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ingress-nginx
  annotations:
    ingress.kubernetes.io/proxyTimeout: 3600s
    ingress.kubernetes.io/proxy-stream-timeout: 3600s
    ingress.kubernetes.io/proxy-connect-timeout: 3600s
    ingress.kubernetes.io/proxy-read-timeout: 3600s
    ingress.kubernetes.io/proxy-send-timeout: 3600s
    ingress.kubernetes.io/proxy_timeout: 3600s
data:
   7687: &quot;test-test-db/test-lb-dev:7687&quot;
   8687: &quot;test-test-db/test-lb-test:8687&quot;
</code></pre>
<p>Anyone please help me to short this issue out.</p>

Taybur Rahman
<p>When using these annotations you have to set them to number (integer) values. For example:</p>
<pre><code> ingress.kubernetes.io/proxy-stream-timeout: &quot;3600&quot;
</code></pre>
<p>instead of:</p>
<pre><code>ingress.kubernetes.io/proxy-stream-timeout: 3600s
</code></pre>
<p>If you need more details regarding the timeout options than please check the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/" rel="nofollow noreferrer">official docs</a>.</p>
