0 0 Share PDF

How to setup log rotation post installation

Article ID: KB000369


The default installation instructions do not include the setup of log rotation. This can cause the server to run out of space as the logs will consume all the available space.


This process affect only the new containers NOT the old ones.

  1. Edit the daemon configuration file:

    $ vim /etc/docker/daemon.json
  2. Add the following lines to file:

    "log-driver": "json-file",
    "log-opts": {
        "max-size": "10m",    
        "max-file": "3"    
  3. Restart the docker daemon: systemctl restart docker

  4. This step is required for ucp-kubelet container log rotation to be enabled:

    docker rm -f ucp-agent and let it reconcile

    docker rm -f ucp-kubelet and let it reconcile

For more details: JSON File logging driver