Warning:detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd".

执行kubeadm init集群初始化时遇到:

[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd".

[警告IsDockerSystemdCheck]:检测到“cgroupfs”作为Docker cgroup驱动程序。 推荐的驱动程序是“systemd”。

 

 

所以我们更换一下驱动。

 

解决方法:修改docker

由于Ubuntu默认没有设置root,所以设置一下root用户

sudo passwd root
输入密码后,切换root用户:su root

 

在/etc/docker下创建daemon.json并编辑:

mkdir /etc/docker/daemon.json
加入以下内容:

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


 

重启docker

systemctl restart docker
systemctl status docker

你可能感兴趣的:(Warning:detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd".)