The NGINX Ingress Controller exposes the logs of the Ingress Controller process (the process that generates NGINX configuration and reloads NGINX to apply it) and NGINX access and error logs. All logs are sent to the standard output and error of the Ingress Controller process. To view the logs, you can execute the
kubectl logs command for an Ingress Controller pod. For example:
$ kubectl logs <nginx-ingress-pod> -n nginx-ingress
The Ingress Controller process logs are configured through the
-v command-line argument of the Ingress Controller, which sets the log verbosity level. The default value is
1, for which the minimum amount of logs is reported. The value
3 is useful for troubleshooting: you will be able to see how the Ingress Controller gets updates from the Kubernetes API, generates NGINX configuration and reloads NGINX.
See also the doc about Ingress Controller command-line arguments.
The NGINX includes two logs:
Access log, where NGINX writes information about client requests in the access log right after the request is processed. The access log is configured via the logging-related ConfigMap keys:
log-formatfor HTTP and HTTPS traffic.
stream-log-formatfor TCP, UDP, and TLS Passthrough traffic.
Additionally, you can disable access logging with the
Error log, where NGINX writes information about encountered issues of different severity levels. It is configured via the
error-log-levelConfigMap key. To enable debug logging, set the level to
debugand also set the
-nginx-debugcommand-line argument, so that NGINX is started with the debug binary
See also the doc about NGINX logs from NGINX Admin guide.