# Ingress client-max-body-size

**URL:** <https://forums.suse.com/t/ingress-client-max-body-size/10747>\
**Category:** SUSE Rancher Prime\
**Created:** [June 13, 2018, 7:05am UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747 "2018-06-13T07:05:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![UXMichael](https://avatars.discourse-cdn.com/v4/letter/u/8e7dd6/32.png) [@UXMichael](https://forums.suse.com/u/UXMichael)\
**Post date:** [June 13, 2018, 7:05am UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747/1 "2018-06-13T07:05:00Z")

</div>

Hi,  
i am a beginner with k8s and ingress. I tried to set the client-max-max-body-size of the nginx with the annotation [nginx.org/client-max-body-size](http://nginx.org/client-max-body-size) at the load balancer but it dont seem to work .

What do i wrong ?

I used [https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/customization](https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/customization)

---

<div class="post-metadata">

**Author:** ![Willian\_Itiho\_Amano](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/willian_itiho_amano/32/4198_2.png) [@Willian\_Itiho\_Amano](https://forums.suse.com/u/Willian_Itiho_Amano)\
**Post date:** [June 20, 2018, 7:10pm UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747/2 "2018-06-20T19:10:30Z")

</div>

Use this annotation

> [nginx.ingress.kubernetes.io/proxy-body-size:](http://nginx.ingress.kubernetes.io/proxy-body-size:) 50m

---

<div class="post-metadata">

**Author:** ![new\_ca\_grower](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@new\_ca\_grower](https://forums.suse.com/u/new_ca_grower)\
**Post date:** [June 28, 2018, 2:02am UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747/3 "2018-06-28T02:02:52Z")

</div>

Were you able to get it working with the annotation above? If so can you provide details on the config file you generated?

---

<div class="post-metadata">

**Author:** ![Willian\_Itiho\_Amano](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/willian_itiho_amano/32/4198_2.png) [@Willian\_Itiho\_Amano](https://forums.suse.com/u/Willian_Itiho_Amano)\
**Post date:** [June 28, 2018, 12:17pm UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747/4 "2018-06-28T12:17:32Z")

</div>

Add this in ingress (Load Balancing) annotation in UI or YAML

[https://github.com/rancher/ingress-nginx/blob/master/docs/user-guide/annotations.md](https://github.com/rancher/ingress-nginx/blob/master/docs/user-guide/annotations.md)

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 50m
  name: lb-app-name
spec:
  rules:
  - host: app.com
    http:
      paths:
      - backend:
          serviceName: sv-app-name
          servicePort: 80
        path: /
```

---

<div class="post-metadata">

**Author:** ![new\_ca\_grower](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@new\_ca\_grower](https://forums.suse.com/u/new_ca_grower)\
**Post date:** [June 28, 2018, 2:46pm UTC](https://forums.suse.com/t/ingress-client-max-body-size/10747/5 "2018-06-28T14:46:12Z")

</div>

> [@Willian\_Itiho\_Amano](#):
>
> [nginx.ingress.kubernetes.io/proxy-body-size:](http://nginx.ingress.kubernetes.io/proxy-body-size:) 50m

Thanks this worked perfectly!
