Traefik Pod logs

Hi there,

I'm running Traefik v1.7 in my K8s cluster as an Ingress Controller.
Is it possible to redirect the logs into a specific Volume ?

I found that but how can I configure it in the Pod deployment ?


Hi @pcasis how it Traefik configured?

  • Are you using a traefik.toml file mounted from a Kubernetes ConfigMap ? If yes, then edit the configmap to specify the filePath directive(s) ([traefikLog] -> filePath and [accessLog] filePath) and restart Traefik's pod so it takes the change in account. Corresponding documentation for Traefik v1.7:

  • Are you using command line (e.g. "CLI") parameters in the Traefik Deployment ? Then add the flags --accessLog.filePath="/path/to/access.log" and --traefikLog.filePath="/path/to/traefik.log", apply it, it will re-create a pod with these changes. Corresponding documentation for 1.7:

IMPORTANT: the link you posted is for the latest version of Traefik, which is v2.0. Be careful to use the v1.7 with the left-bottom drop down menu (last of the Table of Content).

1 Like

I'll try as soon as possible and come back to tell if it works well.

Thank you !

1 Like