Inconsistent cgroup Management Drivers
Symptom
The following information is displayed during cluster initialization:
1
|
detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". |

Key Process and Cause Analysis
The cause is that the cgroup driver of Docker is inconsistent with that of Kubelet. In this example, change the cgroup driver of Docker to be the same as that of Kubelet.
Conclusion and Solution
- View the system-level information about Docker.
docker info | grep Cgroup
- Modify the /usr/lib/systemd/system/docker.service file.
- Edit the /usr/lib/systemd/system/docker.service file.
vim /usr/lib/systemd/system/docker.service
- Add the following content to the file:
ExecStart=/usr/bin/dockerd --exec-opt native.cgroupdriver=systemd
Press Esc, type :wq!, and press Enter to save the file and exit.
- Reload the configuration and restart the service.
systemctl daemon-reload systemctl restart docker
- Check the result.
docker info | grep Cgroup
The command output is as follows:
Cgroup Driver: systemd
- Edit the /usr/lib/systemd/system/docker.service file.
Parent topic: Docker & Kubernetes