<p>I have an application running on a Kubernetes cluster. Sometime in the last month, my proxy-body-size ingress annotations suddenly stopped working. My app now returns 413: Request Entity Too Large whenever called with a large file.</p>

<p>This was after changing from ingress.kubernetes.io/proxy-body-size to nginx.ingress.kubernetes.io/proxy-body-size. Neither currently makes a difference.</p>

<p>The cluster runs stable/nginx-ingress version 1.15.0.</p>

<p>I must have missed something obvious, but I cannot for the life of me figure out what.</p>

<p>My ingress currently looks like this:</p>

<pre><code>kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 20m
  creationTimestamp: "2019-07-03T08:43:43Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: underskrift-detektor-env-v2
    app.kubernetes.io/managed-by: Tiller
    app.kubernetes.io/name: erst-env
    helm.sh/chart: erst-env-1.7.0
  name: underskrift-detektor-env-v2
  namespace: dokumentredskaber
  resourceVersion: "17086462"
  selfLink: /apis/extensions/v1beta1/namespaces/dokumentredskaber/ingresses/underskrift-detektor-env-v2
  uid: aa2cb597-9d6e-11e9-924b-7285e76b0ce4
spec:
  rules:
  - host: svik-ml-dev.erst.dk
    http:
      paths:
      - backend:
          serviceName: underskrift-detektor-app-v2
          servicePort: 8080
        path: /dokument-redskaber/underskrift-detektor/v2
  tls:
  - hosts:
    - svik-ml-dev.erst.dk
    secretName: erst-tls-secret
status:
  loadBalancer:
    ingress:
    - {}
</code></pre>

<p>The output of <code>kubectl describe ing</code> is:</p>

<pre><code>Namespace:        dokumentredskaber
Address:
Default backend:  default-http-backend:80 (&lt;none&gt;)
TLS:
  erst-tls-secret terminates svik-ml-dev.erst.dk
Rules:
  Host                 Path  Backends
  ----                 ----  --------
  svik-ml-dev.erst.dk
                       /dokument-redskaber/underskrift-detektor/v2   underskrift-detektor-app-v2:8080 (&lt;none&gt;)
Annotations:
  nginx.ingress.kubernetes.io/proxy-body-size:  20m
Events:
  Type    Reason  Age                From                      Message
  ----    ------  ----               ----                      -------
  Normal  UPDATE  59m (x6 over 23h)  nginx-ingress-controller  Ingress dokumentredskaber/underskrift-detektor-env-v2
  Normal  UPDATE  59m (x6 over 23h)  nginx-ingress-controller  Ingress dokumentredskaber/underskrift-detektor-env-v2```
</code></pre>

Bluebluebleu
<p>From the official Nginx ingress documentation, the Annotation policy only takes string values, even for integers, <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md" rel="noreferrer">they should be quoted</a>.</p>

<p>Additionally, in some providers, you might want to also try adding the <code>nginx.org/client-max-body-size</code> annotation, alongside the <code>proxy-body-size</code>.</p>

<p>Is not stated in the question so just in case I will mention that the Nginx pods need to be restarted in order to pick the annotation's values.</p>
