https://rancher.com/ logo
Title
n

narrow-noon-75604

10/31/2022, 4:58 PM
Hi, I have deployed an angular application on nginx server as a pod on RKE2 cluster. I am trying to upload a file of size 7MB but the request fails with 413 error. So, I have tried to update the app specific nginx properties to support the max size of 50MB by adding a field "client_max_body_size". This did not solve the issue. So I tried adding the annotations to the ingress object I have created for the angular app, it has modified the "client_max_body_size" of this app in rke2-ingress but that too did not solve the issue. Any help here would be appreciated.
n

numerous-country-20400

10/31/2022, 5:31 PM
be sure to understand that beside the ingress client_max_body_size your angular nginx (of the pod) will have a such a setting too - be sure to adjust both
there have been alot of different annotations in the past to configure the client max body size. The one if found to be working (with the most recent nginx ingress, not sure which version is bundled in rke2 right now), is
"<http://ingress.kubernetes.io/proxy-body-size|ingress.kubernetes.io/proxy-body-size>" : "5000m"
      "<http://nginx.ingress.kubernetes.io/proxy-body-size|nginx.ingress.kubernetes.io/proxy-body-size>" : "5000m"
n

narrow-noon-75604

11/02/2022, 10:40 AM
Thanks @numerous-country-20400, the second one is working for me. It took a good amount of time in finding the right app where this fix needs to be applied.
n

numerous-country-20400

11/19/2022, 11:12 AM
@narrow-noon-75604 great!