How do you add custom NGINX (Ingress) snippets for proxy buffering params in IBM Bluemix/Kubernetes?

9/20/2017

Hi we need to increase the proxy_buffer_size and related parameters on an IBM Kubernetes implementation for the Ingress/NGINX

INgress/NGINX is throwing us a error upstream sent too big header while reading response header from upstream, client

The app we're running is Meteor based which is known for creating large headers related to Browser Policy. To solve this we need to change the location settings to include:

# Increase the proxy buffers for meteor browser-policy.
proxy_buffer_size       128k;
proxy_buffers           4 256k;
proxy_busy_buffers_size 256k;

More info here http://dweldon.silvrback.com/browser-policy, if needed. Note this gist of this is we should not be turning buffering off, but increasing the buffer sizes.

Currently IBM does not support these custom params, so we'd like to inject some custom params, as per nginx.org/location-snippets as per https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/customization

We'd like a way to se the above proxy buffer sizes, please let us know if/how this can be done, pls?

Another alternative, I think would be able to use nginx.org/proxy-buffer-size

thanks

-- aginsburg
ibm-cloud
ibm-cloud-kubernetes
iks
kubernetes
nginx

1 Answer

10/3/2017

Current answer from IBM support: IBM do not support these directives and are looking to add these capabilities in the future... no ETA provided by IBM.

Update: we have been told that IBM has added this capability and asked me to test out... busy trying to get it working. Will update here when I have it working/solved.

Another update: the annotation work... but are kind of useless as they the NGINX top level conf hard codes the proxy-buffers to 8 4k which means there is still not enough capacity to increase the buffer sizes. It thors thw following error "proxy_busy_buffers_size" must be less than the size of all "proxy_buffers" minus one buffer

We have asked IBM to please allow us to ConfigMap and override the top level settings. We'll wait and see.

-- aginsburg
Source: StackOverflow