Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
CRI: Implement container log rotation #58823
TL;DR: We want to allow kubelet to rotate the container stdout/stderr logs, and add a CRI call to ask the runtime to reopen the log file.
kubelet decides the log directory structure and passes to the runtime the path where container log should be stored. Given the level of knowledge and control kubelet has, it is currently the best candidate to rotate the logs (vs. runtime or a separate daemon). The detailed evaluation is in the proposal doc.
IMO, the initial version should target a simple policy of size limit per file. We can iterate and add more advanced features based on disk management in the future. The stretch goal for this release will be supporting reading logs (
As for the docker integration (i.e.,
referenced this issue
Jan 27, 2018
pushed a commit
Jan 30, 2018
@jberkus @idvoretskyi a lot of these are ongoing work in the past few releases to bridge the gap between docker and non-docker runtimes using CRI. They are not used with docker (the only runtime with in-tree support), and are in general not user facing. If all milestone issues must link to a feature, hope this would help: kubernetes/enhancements#552