After analysis, it is found that “kebernetes sets the CGroup driver to SYSTEMd by default, while the CGroup driver of docker service is cgroups”. There are two solutions. First, why is the service configuration file of docker the same as that of kubernetes? Second, modify the configuration file of kebernetes to cgroups. The first one is adopted here.
Modify the configuration file of docker service,/etc/docker/daemon.JSON, and add the following
"exec-opts": ["native.cgroupdriver=systemd"]
Restart dokcer service:
sudo systemctl daemon-reload
sudo systemctl restart docker
Restart kuberlet:
systemctl restart kubelet