<p>I am dealing with CRDs and creating Custom resources. I need to keep lots of information about my application in the Custom resource. As per the official doc, etcd works with request up to 1.5MB. I am hitting errors something like</p>

<blockquote>
  <p>"error": "Request entity too large: limit is 3145728"</p>
</blockquote>

<p>I believe the specified limit in the error is 3MB. Any thoughts around this? Any way out for this problem?</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="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="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="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="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="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>

<p>If you still need help let me know.</p>
