In order to rotate pod logs, logrotate pod is used in kubernetes. By default, logrotate will use copytruncate
mode to create a new rotated file, however datadog
cannot work well in this mode, failed to retrieve pod log occasionally.
So I try to set the mode to create 0644 root root
, but the following error comes up
Cross-device link
And logrotate
failed to rotate logs either.
Could someone help me to resolve this issue or is there any better practice on rotate pod logs?