参考:
https://www.cnblogs.com/pitaiyang/p/17975041
- 报错信息
nginx-ingress-controller限制上传文件大小为1M如果上传文件大于1M则会在浏览器报以下错误
# Request Entity Too Large
- 解决方法
修改ingress配置文件增加以下配置
annotations:
#nginx.org/client-max-body-size: "4096m"
nginx.ingress.kubernetes.io/proxy-body-size: 4096m
一个完整的配置文件如下
# cat ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
generation: 1
name: ingress
namespace: default
annotations:
#nginx.org/client-max-body-size: "4096m"
nginx.ingress.kubernetes.io/proxy-body-size: 4096m
spec:
rules:
- host: test.com
http:
paths:
- backend:
serviceName: test
servicePort: 80
path: /
标签:body,文件大小,ingress,4096m,nginx,size
From: https://www.cnblogs.com/minseo/p/18081046