How do I rotate Traefik Logs?

HI

We have traefik running for a couple of months in Kubernetes, and its has around 60Gig of logs now.
How can we rotate these logs while still remaining in service?

Hello @mattlawnz, Traefik running in docker logs to stdout by default, so there are no logs to rotate.

If you are logging to files, then you need to use the USR1 signal to allow for a logfile rotation.
https://docs.traefik.io/v1.7/configuration/logs/#log-rotation

If you are using the stdout logging, then you should use a cloud-native logging tool to forward your logs to a logging service, in which case you can just rolling update the deployment by updating the deployment with a label or an annotation, which will trigger a re-deploy after a set period of days/weeks to reset the pod logs.