Logs flooding due to using systemd as cgroup driver

When using systemd cgroups driver in kubelet and docker, message flooding will happen.

Symptoms

Causes

https://github.com/opencontainers/runc/blob/master/libcontainer/cgroups/systemd/apply_systemd.go#L123

Resolving the problem

Because this issue does not affect the container metrics, we can just configure rsyslog to ignore such flooding logs.

The configure file of rsyslog locate in /etc/rsyslog.conf or /etc/rsyslog.d/*.conf file.

In order to ignore the previous error message,

:rawmsg, contains, "libcontainer" ~

should be added before the message collecting command, for example,

*.info;mail.none;authpriv.none;cron.none /var/log/messages .

Then restart rsyslog service, this flooding message issue can be ignored.