<p>I need to set keep-alive to 0 for an application and would like to do it on ingressrule layer. Is that possible?</p>

<p>Is there any annotation for that?</p>

<p>In <code>mandatory.yaml</code>, you can add</p>

<p><code>data: keep-alive-requests: "1000000"</code></p>

<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-configuration
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
data:
  proxy-connect-timeout: "10s"
  proxy-read-timeout: "10s"
  client-max-body-size: "2m"
  keep-alive-requests: "1000000"
  upstream-keepalive-requests: "1000000"
</code></pre>
