Increase Kubernetes Nginx Ingress limits for large images in Docker registry
I learned that it's not required to set the ingress class to nginx as I did in kubernetes.io/ingress.class: nginx. All annotations prefixed with nginx.ingress.kubernetes.io apply to the default Kubernetes ingress. Setting the timeouts is also not required. The only important annotation is

nginx.ingress.kubernetes.io/proxy-body-size: "0"


because the default value is way too small for Docker image layers. Without this annotation, we get 413 Request Entity Too Large errors.

The main problem in my case was somewhere else: We had a HAProxy loadbalancer in front of our Kubernetes workers. Being new in those HA technology, it's configuration was pretty default. It contains the following directives:

defaults
    # ...
    retries 3
    timeout connect     1000
    timeout client      1000
    timeout server      1000


According to HAProxys time formats, this got interpreted as ms. In our testing environment, I increased both client/server timeouts to 600s. This fixed all our pushing problems.