We are migrating from a traditional nginx deployment to a kubernetes nginx-ingress controller. I'm trying to apply settings at a location
level, but can't see how to do so with annotations.
For example, we had:
server {
listen 80;
server_name example.com;
location /allow-big-uploads {
client_max_body_size 100M;
...
}
}
And we translate to something like this:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web-ingress
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 100m <-- this now applies globally
spec:
rules:
- host: example.com
http:
paths:
- path: /allow-big-uploads
backend:
serviceName: example-svc
servicePort: 5009
Adding that annotation under the path
section doesn't seem to work. Am I missing something?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…