Kubelet CPU/MemoryAccounting

From WilliamsNet Wiki
Revision as of 01:59, 11 August 2019 by DrEdWilliams (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If you start seeing this type of entry in the system logs:

Aug 10 21:33:50 telmar kubelet[704]: W0810 21:33:50.479159     704 container_manager_linux.go:818] CPUAccounting not enabled for pid: 704
Aug 10 21:33:50 telmar kubelet[704]: W0810 21:33:50.479179     704 container_manager_linux.go:821] MemoryAccounting not enabled for pid: 704

Then (for some reason), the systemd configuration has not enabled the CPU/Memory Accounting, and kubelet doesn't like that ...

On both Debian 10 and CentOS 7, the parameters are set in the /etc/systemd/system.conf -- uncomment the lines reffering to DefaultCPUAccounting and DefaultMemoryAccounting, making sure they are set to 'yes'. Then reload the systemd configuration and restart kubelet:

systemctl daemon-reload
systemctl restart kubelet

That will stop the messages.