<p>on my Cluster, I'm trying to upload a big file but when I try, I get the <code>413 Error</code></p>
<pre><code>error parsing HTTP 413 response body: invalid character '&lt;' looking for beginning of value: &quot;&lt;html&gt;\r\n&lt;head&gt;&lt;title&gt;413 Request Entity Too Large&lt;/title&gt;&lt;/head&gt;\r\n&lt;body&gt;\r\n&lt;center&gt;&lt;h1&gt;413 Request Entity Too Large&lt;/h1&gt;&lt;/center&gt;\r\n&lt;hr&gt;&lt;center&gt;nginx/1.19.3&lt;/center&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;\r\n&quot;
</code></pre>
<p>I know that this is caused by a default parameter of nginx and I need to override it. On the documentation I've found that this can be done using two ways:</p>
<ol>
<li>using annotation on ingress config</li>
<li>using a configMap</li>
</ol>
<p>I have tried both ways with no result.</p>
<p>Here are my yaml:
ingress.yml</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: &quot;700m&quot;
  name: nginx-ingress
spec:
  rules:
    - host: example.com
      http:
        paths:
          - backend:
              serviceName: nginx-service
              servicePort: 80
            path: /              
</code></pre>
<p>and configmap.yml:</p>
<pre><code>apiVersion: v1
data:
  proxy-body-size: &quot;800m&quot;
kind: ConfigMap
metadata:
  name: ingress-nginx-controller
  labels:
    app.kubernetes.io/name: nginx-ingress
    app.kubernetes.io/part-of: nginx-ingress
</code></pre>

<p>For future searchs, It works for me:</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: &quot;0&quot;
    nginx.ingress.kubernetes.io/proxy-read-timeout: &quot;600&quot;
    nginx.ingress.kubernetes.io/proxy-send-timeout: &quot;600&quot;
  name: docker-registry
  namespace: docker-registry
spec:
</code></pre>
