Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set keep alive in ingress rule for nginx inress controller

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

Is there any annotation for that?

like image 808
sokolata Avatar asked Oct 22 '25 09:10

sokolata


1 Answers

In mandatory.yaml, you can add

data: keep-alive-requests: "1000000"

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"
like image 191
waterdudu Avatar answered Oct 24 '25 08:10

waterdudu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!