Skip to content

RKE2 log rotation #3002

Answered by Torkolis
Torkolis asked this question in Q&A
May 30, 2022 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

use this option in the /etc/rancher/rke2/config.yaml file:

kubelet-arg:
  - container-log-max-files=3
  - container-log-max-size=2Mi

defaults for these options are 5 and 10Mi respectively, so one container can produce max 5 log files, 3 of which will be gzipped to be smaller size, so max total size should not exceed 30-40 Mi.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Torkolis
Comment options

@Torkolis
Comment options

@DaliborLabudovicGP
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Torkolis
Comment options

You must be logged in to vote
1 reply
@brandond
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants