kubernetes how to set the maximum size of the log file?

How to set the maximum size of the log file? Or enable log rotation.
In the documentation I have not found anything about this.

Or it is necessary to write a script for this?

  • What is the benefit of Docker container for a memcached instance?
  • Using docker-compose in Dockerfile
  • How to know if docker is already logged in to a docker registry server
  • Only some locally built Docker images fail to work on remote server (error: “No command specified”)
  • Node.js modules not building in Docker
  • Point my domain to specific docker container with apache
  • Can't connect to dockerized MongoDB instance
  • Pushing to a private Docker v2 registry gives an error: Manifest invalid
  • Bluemix Container status reads 'Networking'
  • Use nginx as proxy with docker
  • How to get and present docker states inside html page by javascript?
  • how does an app within a docker container access database hosted on another server which is in the same LAN
  • One Solution collect form web for “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
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.