<p>I have some up &amp; running kubernetes cluster which potentially can produce a lot of logs.
Kubernetes is running on top of docker so I think I need to <a href="https://docs.docker.com/config/containers/logging/json-file/" rel="noreferrer">configure dockerd to rollout logs</a>.</p>

<p>I found some settings for logging driver for dockerd:</p>

<pre><code>{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10k",
    "max-file": "2"
  }
}
</code></pre>

<p>In case of docker service restart the changes are successfully applied.</p>

<pre><code>du /var/lib/docker/containers/container_hash/container_hash* -h
</code></pre>

<p>shows log files splitted on chunks by appropriate size.</p>

<p>But I don't want to restart the daemon, so tried to reload configuration with:</p>

<pre><code>sudo kill -SIGHUP $(pidof dockerd)
</code></pre>

<p>In syslog I found: </p>

<pre><code>Mar 12 15:38:16 kso-gl dockerd[5331]: time="2018-03-12T15:38:16.446894155+02:00" level=info msg="Got signal to reload configuration, reloading fr
om: /etc/docker/daemon.json"
</code></pre>

<p>So, I assume the configuration was reloaded. Unfortunately it had no effect. Even for new containers.
Looks like subsystem related to logging drivers ignores configuration reload.</p>

<p>Sadly it appears the configuration reload SIGHUP feature does not support all configuration options.</p>

<p>The docs at <a href="https://docs.docker.com/v17.09/engine/reference/commandline/dockerd/#miscellaneous-options" rel="noreferrer">https://docs.docker.com/v17.09/engine/reference/commandline/dockerd/#miscellaneous-options</a> (See the "CONFIGURATION RELOAD BEHAVIOR" section) tell us the only supported configuration options which can be reloaded in this way are:</p>

<pre><code>The list of currently supported options that can be reconfigured is this:

debug: it changes the daemon to debug mode when set to true.
cluster-store: it reloads the discovery store with the new address.
cluster-store-opts: it uses the new options to reload the discovery store.
cluster-advertise: it modifies the address advertised after reloading.
labels: it replaces the daemon labels with a new set of labels.
live-restore: Enables keeping containers alive during daemon downtime.
max-concurrent-downloads: it updates the max concurrent downloads for each pull.
max-concurrent-uploads: it updates the max concurrent uploads for each push.
default-runtime: it updates the runtime to be used if not is specified at container creation. It defaults to “default” which is the runtime shipped with the official docker packages.
runtimes: it updates the list of available OCI runtimes that can be used to run containers
authorization-plugin: specifies the authorization plugins to use.
allow-nondistributable-artifacts: Replaces the set of registries to which the daemon will push nondistributable artifacts with a new set of registries.
insecure-registries: it replaces the daemon insecure registries with a new set of insecure registries. If some existing insecure registries in daemon’s configuration are not in newly reloaded insecure resgitries, these existing ones will be removed from daemon’s config.
registry-mirrors: it replaces the daemon registry mirrors with a new set of registry mirrors. If some existing registry mirrors in daemon’s configuration are not in newly reloaded registry mirrors, these existing ones will be removed from daemon’s config.
</code></pre>

<p>Which, as you can see, does not include the <code>log-driver</code> or <code>log-opts</code> configuration parameters.</p>

<p>I'm not aware of a way to reload the logging configuration without a restart, at this time.</p>
