You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to config containerd log size limit and rotate? #4830
I think your question is How to config containerd log-driver and limit these container stdout log.
Because docker have multiple types log-driver .eg: Fluentd , json-file, sys-log. But I'm not found the log-driver config about container stdou or stderr in contianerd config default.
@hillbun yes.
If you run container with crictl or kubelet, it wiil be logged in json format. But there is no config for logrotate. You could add a cron job on the machine like logrotate -v -f /etc/logrotate.conf to support max-log-size and max-log-file
As was mentioned there: containerd is lower level than Docker, and does not itself provide log plugins or container output log rotation functionality. containerd simply provides plumbing for the orchestrator to receive the container output, so it would be up to the orchestrator (e.g. kubelet) to do the right thing.
Activity
sober-wang commentedon Dec 12, 2020
I think your question is How to config containerd log-driver and limit these container stdout log.
Because docker have multiple types log-driver .eg: Fluentd , json-file, sys-log. But I'm not found the log-driver config about container stdou or stderr in contianerd config default.
hillbun commentedon Dec 13, 2020
@sober-wang
Do you mean it is unlimited log size?
windniw commentedon Dec 13, 2020
@hillbun yes.
If you run container with
crictlorkubelet, it wiil be logged in json format. But there is no config for logrotate. You could add a cron job on the machine likelogrotate -v -f /etc/logrotate.confto supportmax-log-sizeandmax-log-filekevpar commentedon Dec 14, 2020
Here's a previous issue on this: #3351
As was mentioned there: containerd is lower level than Docker, and does not itself provide log plugins or container output log rotation functionality. containerd simply provides plumbing for the orchestrator to receive the container output, so it would be up to the orchestrator (e.g. kubelet) to do the right thing.
cpuguy83 commentedon Dec 15, 2020
Yes, Kubelet is responsible for handling these logs: kubernetes/kubernetes#59898