'Kubernetes ingress timeout annotations not getting applied to the Nginx ingress controller
Edit: Now working. We do not what caused it to not work before.
We are trying to set a different timeout for one of our downstream services (location) for our nginx controller. We are using the annotations in the ingress documented here. We can see that our other annotation are taking effect on our service, but the timeouts does not work.
This a snippet from our service ingress config,
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: namespace
name: ingress-name
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
In the nginx.conf for each location block/service we can see that the timeout values does not change.
proxy_connect_timeout 5s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
As we understand according to the source code the default values above will be set if these annotations are not set.
We have also read this issue and checked so that we have not made the same mistakes as they are discussing.
We are using version v0.40.0 of Nginx helm chart to install Nginx
Our kubernetes version is 1.19.7.
We have not changed the default nginx annotation namespace so it should be nginx.ingress.kubernetes.io
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|