note

Linux Is Awesome

Configure Nginx Ingress Controller to use custom log format

#ProblemI want to collect all traffic log from Nginx Ingess. #Referenceshttps://dev.to/bzon/send-gke-nginx-ingress-controller-logs-to-stackdriver-2ih4https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/#SolutionCustom log format with ConfigMap following settings: apiVersion: v1 kind: ConfigMap metadata: name: ingress-nginx-controller labels: app: nginx-ingress data: # log-format-escape-json: "true" log-format-upstream: '$