<p>All cookies and headers are a construct of the HTTP protocol. Kubernetes Services operate on TCP/UDP packets therefore it will pass the payload as-is.</p>

<p>It is not that there isn't an <code>nginx.conf</code> file but rather the configuration is managed via annotations. See this link
<a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md</a></p>

CC BY-SA 4.0
2019-06-27T06:41:56.343Z
2019-06-27T06:41:56.343Z
kaizenCoder
<p>Report from Stack Overflow due to off-topic</p>

<p><strong>Base knowlege</strong></p>

<p>Since this question deals particularly with various timeouts configuration in <code>Nginx</code>, I thought giving their references here would make it easier for everyone to help me. These are <code>Nginx</code> time out directives I use:</p>

<ol>
<li><p>proxy_connect_timeout: Defines a timeout for establishing a connection with a proxied server. It should be noted that this timeout cannot usually exceed 75 seconds.</p></li>
<li><p><code>proxy_read_timeout</code>: Defines a timeout for reading a response from the proxied server. The timeout is set only between two successive read operations, not for the transmission of the whole response. If the proxied server does not transmit anything within this time, the connection is closed.</p></li>
<li><p><code>proxy_send_timeout</code>: Sets a timeout for transmitting a request to the proxied server. The timeout is set only between two successive write operations, not for the transmission of the whole request. If the proxied server does not receive anything within this time, the connection is closed.</p></li>
</ol>

<p><strong>Scenario</strong></p>

<p>Machine from Internet (A) &ndash; <strong>opens HTTP connection</strong> &ndash; > NginxPod (B) &ndash; <strong>reverses proxy</strong> &ndash; > a ClusterIP service (C).</p>

<pre><code>    location /abc {
        proxy_pass http://service1.test.svc.cluster.local:3000;
        # This is a dns name given to a `ClusterIP` service by K8s.

        proxy_connect_timeout 2m;
        proxy_read_timeout 60m;
        send_timeout 60m;
    }
</code></pre>

<p>K8s will do some magic internally (e.g. <em>load balancing</em> my requests to specific pods which are serving the service1).</p>

<p>Because there's another layer of load balancing imposed by K8s which I'm not in charged of, I wonder if my timeout settings for <code>Nginx</code> will be honored by K8s.</p>

CC BY-SA 4.0
2019-06-23T10:19:09.557Z
What is the purpose of the **reverse proxy** here?
kaizenCoder
CC BY-SA 4.0
2019-06-26T07:12:35.697Z
We use an Nginx pod to reverse proxy instead of Nginx Ingress because we have the need to use the `nginx.conf` file. If we used Nginx Ingress, there's no `nginx.conf` and we're afraid there may be configurations that are not fully supported.
Tran Triet
<kubernetes><nginx>
Does K8s ClusterIP service supports custom timeout?
Tran Triet
# Does K8s ClusterIP service supports custom timeout?

(Asked by: username_0 on 2019-06-12)

Report from Stack Overflow due to off-topic
Base knowlege
Since this question deals particularly with various timeouts configuration in Nginx, I thought giving their references here would make it easier for everyone to help me. These are Nginx time out directives I use:

proxy_connect_timeout: Defines a timeout for establishing a connection with a proxied server. It should be noted that this timeout cannot usually exceed 75 seconds.
proxy_read_timeout: Defines a timeout for reading a response from the proxied server. The timeout is set only between two successive read operations, not for the transmission of the whole response. If the proxied server does not transmit anything within this time, the connection is closed.
proxy_send_timeout: Sets a timeout for transmitting a request to the proxied server. The timeout is set only between two successive write operations, not for the transmission of the whole request. If the proxied server does not receive anything within this time, the connection is closed.

Scenario
Machine from Internet (A) – opens HTTP connection – > NginxPod (B) – reverses proxy – > a ClusterIP service (C).
    location /abc {
        proxy_pass http://service1.test.svc.cluster.local:3000;
        # This is a dns name given to a `ClusterIP` service by K8s.

        proxy_connect_timeout 2m;
        proxy_read_timeout 60m;
        send_timeout 60m;
    }

K8s will do some magic internally (e.g. load balancing my requests to specific pods which are serving the service1).
Because there's another layer of load balancing imposed by K8s which I'm not in charged of, I wonder if my timeout settings for Nginx will be honored by K8s.

**Tags:** kubernetes, nginx

> **Comments:**
> **username_1**: What is the purpose of the **reverse proxy** here?  
> **username_0**: We use an Nginx pod to reverse proxy instead of Nginx Ingress because we have the need to use the `nginx.conf` file. If we used Nginx Ingress, there's no `nginx.conf` and we're afraid there may be configurations that are not fully supported.  

---

## 1 answers

### Answer by username_1 on 2019-06-27. Score: 1

All cookies and headers are a construct of the HTTP protocol. Kubernetes Services operate on TCP/UDP packets therefore it will pass the payload as-is.

It is not that there isn't an `nginx.conf` file but rather the configuration is managed via annotations. See this link
<https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md>


---

