KONG_NGINX_HTTP_LOG_FORMAT and KONG_CLIENT_BODY_BUFFER_SIZE ignored

Hi everybody,

we have installed kong ingress controller using:
kubectl apply -f https://bit.ly/kong-ingress-dbless

as stated in the docs, on our kubernetes cluster 1.16.8.

We need to use the variables at issue in order to customize logging and increase nginx buffer size.
However kong seems to ignore them completely.

Are these variables supported ?
Where can we find related config on the POD file system to check if the configuration has been applied?

Thanks in advance

You can find the config file under /etc/kong/kong.conf.default on the container. You can run the below command to get the file locally. This will create a temporary docker container and copy the content to your local file. Make the appropriate changes referencing this conf file and mount the same to tyour kube pod using a configmap which will work just fine.

docker run --rm --name kong -e "KONG_DATABASE=off" -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" -e "KONG_PROXY_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 kong cat /etc/kong/kong.conf.default > kong.conf

You can add nginx specific config using “nginx_” prefix in the config file. You may refer this url for more instructions on injecting nginx directives.

Hope this helps you fixing your issue.

Thank you @vamshisiddarth

I was messing up with the name: KONG_NGINX_HTTP_CLIENT_BODY_BUFFER_SIZE worked properly

Regards
Alessio

1 Like