<p>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?</p>

yuany
<p>Source for this answer: <a href="https://stackoverflow.com/a/60492986/12153576">https://stackoverflow.com/a/60492986/12153576</a></p>

<ul>
<li>The <code>"error": "Request entity too large: limit is 3145728"</code> is probably the default response from kubernetes handler for objects larger than 3MB, as you can see <a href="https://github.com/kubernetes/kubernetes/blob/db1990f48b92d603f469c1c89e2ad36da1b74846/test/integration/master/synthetic_master_test.go#L315" rel="nofollow noreferrer">here at L305</a> of the source code:</li>
</ul>

<pre><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`
</code></pre>

<ul>
<li><p>The <a href="https://github.com/etcd-io/etcd/issues/9925" rel="nofollow noreferrer">ETCD</a> has indeed a 1.5MB limit for processing a file and you will find on <a href="https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/limit.md#request-size-limit" rel="nofollow noreferrer">ETCD Documentation</a> a suggestion to try the<code>--max-request-bytes</code> flag but it would have no effect on a GKE cluster because you don't have such permission on master node.</p></li>
<li><p>But even if you did, it would not be ideal because usually this error means that you are <a href="https://github.com/kubeflow/pipelines/issues/3134#issuecomment-591278230" rel="nofollow noreferrer">consuming the objects</a> instead of referencing them which would degrade your performance.</p></li>
</ul>

<p>I highly recommend that you consider instead these options:</p>

<ul>
<li><strong>Determine whether your object includes references that aren't used;</strong></li>
<li><strong>Break up your resource;</strong></li>
<li><strong>Consider a volume mount instead;</strong></li>
</ul>

<hr>

<p>There's a request for a <a href="https://github.com/kubernetes/kubernetes/issues/88709" rel="nofollow noreferrer">new API Resource: File (orBinaryData)</a> that could apply to your case. It's very fresh but it's good to keep an eye on.</p>
