<p>I am trying to set a value to proxy-body-size annotation but am sure how to come up to a number for the same. For example, if I am pushing data worth 2GB, a body-size of 1GB is throwing a &quot;413 Request too large&quot; error whereas, a 3GB limit works fine.</p>
<p>So I wanted to understand what exactly is a body size in nginx. Is it a packet/smaller part of a whole or a whole data (say 2GB that I'm pushing as mentioned above).</p>
<p>Any help would be greatly appreciated.</p>

<p>You have to set the maximum allowed size in the request body. So you have to set the value greater than the size of data that you are trying to push.</p>
<p>From the Documentation
<a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#custom-max-body-size" rel="noreferrer">https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#custom-max-body-size</a></p>
<pre><code>Custom Body Size: For NGINX, an 413 error will be returned to the client when the size in a request exceeds the maximum allowed size of the client request body. This size can be configured by the parameter client_max_body_size.

To configure this setting globally for all Ingress rules, the proxy-body-size value may be set in the NGINX ConfigMap. To use custom values in an Ingress rule define these annotation:
nginx.ingress.kubernetes.io/proxy-body-size: 8m
</code></pre>
