GKE Ingress: http status code 413 Request entity too large

3/26/2018

We have default Ingress apiVersion: extensions/v1beta1 serving multiple Pods in Google Kubernetes Engine. The problem appears on our website when we click link which will go through the same Ingress with large header size. It works with smaller header size.

I have tried switching to ingress-nginx and modified client_max_body_size with annotation/configmap proxy-body-size: "500m" without success. We are using Kubernetes versions 1.7.12-gke.1 for master and 1.7.10-gke.0 for node.

Is there any solution to modify allowed header size directly? I'm out of ideas.

-- Eerik Kuoppala
google-cloud-platform
google-kubernetes-engine
kubernetes
kubernetes-ingress

2 Answers

4/6/2018

It seems that Google Cloud didn't replace old load balancer. I removed the old load balancer from Google Cloud -> Network Services -> Load Balancing and Ingress. Then I created the new Ingress resource, configured DNS to new IP-address and http status 413 didn't come.

-- Eerik Kuoppala
Source: StackOverflow

3/27/2018

The default load balancer witch is Ingress in GKE, block request to the backend services if requested URL and headers size is longer than about 15KB for the general security reason. Please consider that if this URL is affecting sending such large amount of data, that probably is something wrong with backend application - maybe infinite loop for example or misconfigured Web services. If you are sure that everything is fine on the backend side you can consider to deploy custom Kubernet Ingress from github and tune up client header buffer size witch is mentioned here.

-- d0bry
Source: StackOverflow