Kubernetes Ingress annotations for Harbor

When pushing large images to harbor image registry, client may run into push operation timeout due to incorrect proxy-*-timeout configuration, or 403 forbidden due to insufficient proxy-body-size configuration. The solution is to patch ingress resource of harbor. Here is an example:

metadata:
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "0" # Allow large uploads, other legal values are 20000m
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "60000" # allow long-time connection
    nginx.ingress.kubernetes.io/proxy-read-timeout: "60000" # allow long-time connection
    nginx.ingress.kubernetes.io/proxy-send-timeout: "60000" # allow long-time connection
    nginx.ingress.kubernetes.io/proxy_buffering: "off" # Optional
    nginx.ingress.kubernetes.io/proxy_ignore_headers: X-Accel-Buffering # Optional
    nginx.ingress.kubernetes.io/ssl-redirect: "true" # Optional

These annotations also applies to other applications (e.g. Nextcloud and MinIO) with large uploads/downloads.




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Debugging Nextcloud LDAP with occ
  • Complete Guide to Intel i3-12100 iGPU SR-IOV on Proxmox VE 9
  • NFS over RDMA Configuration Guide
  • InfiniBand Quick Command Reference
  • Exposing an Internal SSH Port with FRP and Docker Compose