I'm working with a Kubernetes (k8s) Ingress and need to increase the upload size limit. I added the following annotation to my Ingress definition:
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: '200m'
However, I still receive a 413 Request Entity Too Large
error when trying to upload files.
Additionally, I've noticed that the quotes around the proxy-body-size
value are removed after the Ingress is applied. Here is my full Ingress configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app-uat
namespace: app-uat
annotations:
ingress.kubernetes.io/ssl-redirect: 'false'
nginx.org/redirect-to-https: 'false'
nginx.ingress.kubernetes.io/proxy-body-size: '200m'
spec:
ingressClassName: nginx
tls:
- hosts:
- mydomain.com
secretName: mydomain-tls
rules:
- host: mydomain.com
http:
paths:
- path: /core/
pathType: Prefix
backend:
service:
name: app-core
port:
number: 80
- path: /proxy/
pathType: Prefix
backend:
service:
name: app-proxy
port:
number: 80
- path: /panel/
pathType: Prefix
backend:
service:
name: admin-panel
port:
number: 80
Questions:
- Why am I still getting the
413 Payload Too Large
error despite adding thenginx.ingress.kubernetes.io/proxy-body-size
annotation? - Why are the quotes around the
proxy-body-size
value removed after the Ingress is applied, and does this affect the functionality? Because I've read somewhere that the nginx annotations should be quoted.