I want to ask why the Kubernetes networking driver weave container is generating a lot of logs?
The log file size is 700MB after two days.
How can I solve that?
I want to ask why the Kubernetes networking driver weave container is generating a lot of logs?
The log file size is 700MB after two days.
How can I solve that?
Logs in kubernetes
As it was said in comment, kubernetes is not responsible for log rotation. This is from kubernetes documentation:
As proposed option, this can be managed on container's runtime level.
Please refer to Logging at the node level.
Reducing logs for Weave CNI
There are two containers in each pod. Weave itself and weave-npc (which is a network policy controller).
By default weave's log level is set to INFO. This can be changed to WARNING to see only exceptions. This can be achieved by adding
--log-levelflag through theEXTRA_ARGSenvironment variable for the weave:So
weave containerpart should look like:Weave - logs level.
A lot of logs go from
Weave NPC, there's an option that allows todisableNPC. However based on documentation this is a paid option based on their documentation - cloud.weave.worksWeave - Changing configuration options