2

We are hitting an error "Request entity too large: limit is 3145728" when trying to update a custom resource object. That would be very helpful if any one knows how to change the size limit from k8s side. Is there any exposed parameters for user?

chub500
  • 712
  • 6
  • 18
yuany
  • 21
  • 1
  • 2
  • 2
    Does this answer your question? [Kubernetes object size limitations](https://stackoverflow.com/questions/60468110/kubernetes-object-size-limitations) – chub500 May 12 '20 at 15:04

2 Answers2

1

Source for this answer: https://stackoverflow.com/a/60492986/12153576

  • The "error": "Request entity too large: limit is 3145728" is probably the default response from kubernetes handler for objects larger than 3MB, as you can see here at L305 of the source code:
expectedMsgFor1MB := `etcdserver: request is too large`
expectedMsgFor2MB := `rpc error: code = ResourceExhausted desc = trying to send message larger than max`
expectedMsgFor3MB := `Request entity too large: limit is 3145728`
expectedMsgForLargeAnnotation := `metadata.annotations: Too long: must have at most 262144 bytes`
  • The ETCD has indeed a 1.5MB limit for processing a file and you will find on ETCD Documentation a suggestion to try the--max-request-bytes flag but it would have no effect on a GKE cluster because you don't have such permission on master node.

  • But even if you did, it would not be ideal because usually this error means that you are consuming the objects instead of referencing them which would degrade your performance.

I highly recommend that you consider instead these options:

  • Determine whether your object includes references that aren't used;
  • Break up your resource;
  • Consider a volume mount instead;

There's a request for a new API Resource: File (orBinaryData) that could apply to your case. It's very fresh but it's good to keep an eye on.

Mark Watney
  • 5,268
  • 2
  • 11
  • 33
0

Check the files in the chart directory. You may have included some unrelated files in it!

Mostafa Ghadimi
  • 5,883
  • 8
  • 64
  • 102