<p>I have deployed a private Docker registry (image <code>registry:2</code>) in a Kubernetes cluster and exposed it via an <code>Ingress</code>. I am using the <code>nginxinc/kubernetes-ingress</code> (not: <code>kubernetes/ingress-nginx</code>) <a href="https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/nginx-ingress-controllers.md" rel="nofollow noreferrer">NGINX ingress controller</a>.</p>

<p><code>curl https://my_registry/v2/_catalog</code> works fine. But <code>docker push</code> into the registry runs into this error: <code>Pushing</code> ... <code>100.6MB/100.6MB</code> ... <code>413 Request Entity Too Large</code>.</p>

<p>For what I know, this can be mitigated by instructing the NGINX ingres controller to accept larger chunks of data. I have e.g. tried adding the annotation <code>nginx.ingress.kubernetes.io/proxy-body-size: "200m"</code> into my <code>Ingress</code> specification (as suggested <a href="https://github.com/nginxinc/kubernetes-ingress/issues/21" rel="nofollow noreferrer">here</a>) but this has not worked so far.</p>

<p>So what is the right way for instructing an <code>nginxinc/kubernetes-ingress</code> NGINX ingress controller to accept sufficiently large chunks?</p>

<p><strong>UPDATE</strong> I have meanwhile <a href="https://github.com/nginxinc/kubernetes-ingress/pull/33" rel="nofollow noreferrer">concluded</a> that <code>nginxinc/kubernetes-ingress</code> does not take its configuration from annotations, but from a <code>ConfigMap</code> named <code>nginx-config</code> that resides in the same namespace as the NGINX ingress controller. I have now added such a <code>ConfigMap</code> with <code>data</code> <code>client-max-body-size: "200m"</code>, but the problem still persists.</p>

rookie099
<p>I have switched from <a href="https://github.com/nginxinc/kubernetes-ingress" rel="nofollow noreferrer">NGINX Inc.'s</a> to <a href="https://github.com/kubernetes/ingress-nginx" rel="nofollow noreferrer">Kubernetes'</a> NGINX ingress controller, and there adding the following annotation to the <code>Ingress</code>' <code>metadata</code> proved sufficient:</p>

<pre><code>annotations:
  nginx.ingress.kubernetes.io/proxy-body-size: 500m
</code></pre>
