kubernetes how to set the maximum size of the log file?
I don't think kubernetes provides log rotation feature now. You can put logrotate configuration in your host machine. Something like this one:
/var/lib/docker/containers/*/*.log { rotate 7 daily size=10M compress missingok delaycompress copytruncate}