<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>

<p>Annotations does not work in tcp-services for updating <code>proxy_timeout</code> parameter in nginx.
You need to update the configmap <code>ingress-nginx-controller</code> and add the <code>proxy-stream-timeout: &quot;3600s&quot;</code> under <code>data</code>. (A sample below)</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: ingress-nginx-controller
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
data:
  proxy-connect-timeout: &quot;10&quot;
  proxy-read-timeout: &quot;120&quot;
  proxy-send-timeout: &quot;120&quot;
  proxy-stream-timeout: &quot;3600s&quot;
</code></pre>
