413 error with Kubernetes and Nginx ingress controller
To set it globally, this configmap.md documentation might be helpful. Turns out the variable to set is proxy-body-size
, not client-max-body-size
.
When you deploy the helm chart, you can set --set-string controller.config.proxy-body-size="4m"
.
You can use the annotation nginx.ingress.kubernetes.io/proxy-body-size
to set the max-body-size option right in your Ingress object instead of changing a base ConfigMap.
Here is the example of usage:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-app
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
...