How to limit the request body size when using GKE Gateway controller?

180 Views Asked by At

I'm on GKE and I want to migrate from an nginx Ingress to a Gateway + HttpRoute. I was using the nginx.ingress.kubernetes.io/proxy-body-size annotation to limit the size of the request body at the load balancer level.

I did not find a way to do that in the HttpRoute API Spec.

Is there a way to do this when using a Gateway instead of an Ingress?

1

There are 1 best solutions below

0
Yvan G. On

The Kubernetes Gateway API and HTTPRoute do not directly support the nginx.ingress.kubernetes.io/proxy-body-size annotation for controlling the request body size at the load balancer level. This means that if you need to control the request body size, you will need to use a different method, such as using a filter or a custom ingress controller.