Kubernetes Kong Custom NGINX Template - How?

Hello,

I would like to add a value (request_trace_id: <request_trace_id_value>) to the Kong logs. We deploy Kong via Kubernetes, using a deployment manifest file. According to the Kong documentation on logging, you can use custom NGINX templates to customize logging. However, it is not clear where to create this template or how to make sure Kong reads the custom template when using Kong on Kubernetes.

Anyone know how to do this?

Thanks in advance.

Hello,

Documentation on how to customize the Nginx configuration file can be found here: Configuration Reference - v2.5.x | Kong - Open-Source API Management and Microservice Management

See the “Injecting Nginx directives” and “Custom Nginx templates” sections.