We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
If you're using the Nginx Ingress Controller on Kubernetes, you might have stumbled on a response code 413 when you upload items via the ingress controller.
According to http.cat, 413 means Payload too large
. This is because the default maximum body size in the ingress controller is configured to a rather small default value.
Luckily, there is an annotion you can add to the ingress definition which can change this value. The annotation you need to use is called nginx.ingress.kubernetes.io/proxy-body-size
.
You can configure it as follows:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
kubernetes.io/tls-acme: 'true'
name: docker-registry
namespace: docker-registry
spec:
tls:
- hosts:
- registry.<your domain>
secretName: registry-tls
rules:
- host: registry.<your domain>
http:
paths:
- backend:
serviceName: docker-registry
servicePort: 5000
path: /
There are many more annotations you can use. You can find the full list here.
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.