annotation proxy-body-size doesn't work in kubernete nginx-ingress

12/26/2019

i have used item proxy-body-size as describe in document, and recreate my ingress.But it has no effect on the ingress-controller.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: fileupload-ingress
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 100m
    nginx.org/rewrites: "serviceName=fileupload-service rewrite=/;"

and then i changed my configmap to change proxy-body-size.But it still doesn't work globally.

kind: ConfigMap
apiVersion: v1
metadata:
  name: nginx-config
  namespace: nginx-ingress
data:
  proxy-body-size: "100m"

here's the document https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#rewrite

what's wrong with my ingress..help!!! enter image description here

-- Aaron.li
kubernetes
nginx

1 Answer

1/3/2020

There are different ingress controllers and the annotations for them vary. So for kubernetes/ingress-nginx annotations starts with nginx.ingress and for nginxinc/kubernetes the annotations starts with nginx.org.

Here is also a good document showing more differences between them.

-- acid_fuji
Source: StackOverflow