We would like to increase the size of the logs that kubectl log
retrieves.
As of Container-Optimized OS (COS) VERSION_ID=56 BUILD_ID=9000.84.2 (according to /etc/os-release
), the following logrotate script is used: /etc/logrotate.d/docker-containers:
/var/lib/docker/containers/*/*-json.log {
rotate 5
copytruncate
missingok
notifempty
compress
maxsize 10M
daily
dateext
dateformat -%Y%m%d-%s
create 0644 root root
}
How can I increase the maxsize from 10M?
One thing I thought would be set the user-data metadata within the nodePools creation, but the NodeConfig documentation states that this is impossible: “keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data"”
In Google Container Engine clusters that are created from newer build of Container-Optimized OS (COS) images the value of
maxsize
for logrotate is changed to100M