kubernetes of some of the error

1, kubelet and docker's Cgroup Driver error caused by inconsistent

7月 01 15:05:59 kubeadm-master kubelet[9931]: W0701 15:05:59.697391    9931 watcher.go:87] Error while processing event ("/sys/fs/cgroup/devices/libcontainer_34389_systemd_test_default.slice": 0x40000100 == IN_CREATE|IN_ISDIR): inotify_add_watch /sys/fs/cgroup/devices/libcontainer_34389_systemd_test_default.slice: no such file or directory

yum install kubelet default is cgroupfs, and docker is generally the default systemd. But when kubernetes installation is recommended to use systemd, of course, you can also modify docker is cgroupfs, to modify docker

#vim /etc/docker/daemon.json

{
  "exec-opts": ["native.cgroupdriver=cgroupfs"]
}

The changes to take effect:

#systemctl  daemon-reload

#systemctl restart docker

 

Kubelet can also modify the configuration file:

#vim /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml --cgroup-driver=systemd"

#systemctl daemon-reload

#systemctl restart omelet

 

Guess you like

Origin www.cnblogs.com/cuishuai/p/11114696.html