Kubernetes cannot upload files larger than 1 MB

We have a kubernetes cluster that has a dropwizard based web app running as a service. This application has an additional uri for uploading files. It cannot upload files larger than 1MB. I am getting the following error:

ERROR [2017-07-27 13:32:47,629] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: ea812501b414f0d9
! com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
!  at [Source: <html>
! <head><title>413 Request Entity Too Large</title></head>
! <body bgcolor="white">
! <center><h1>413 Request Entity Too Large</h1></center>
! <hr><center>nginx/1.11.3</center>
! </body>
! </html>
      

Run codeHide result


I've tried the suggestions given at https://github.com/nginxinc/kubernetes-ingress/issues/21 . I edited Ingress to set proxy body size annotation. Also, I tried using configMap without any success. we are using kubernetes version 1.5. Please let me know if you need more information.

+3


source to share


1 answer


If it was on my setup. Two tips here:

1: go to the official nubx kubernetes login, it's awesome ( https://github.com/kubernetes/ingress/tree/master/controllers/nginx )

2: With the specified input, you can add annotation to your Ingresses to limit the body size limit for each input like this:



annotations:
  ingress.kubernetes.io/proxy-body-size: 10m

      

works great

+4


source







All Articles