Rate This Document
Findability
Accuracy
Completeness
Readability

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

  1. View the system-level information about Docker.
    docker info | grep Cgroup
  2. Modify the /usr/lib/systemd/system/docker.service file.
    1. Edit the /usr/lib/systemd/system/docker.service file.
      vim /usr/lib/systemd/system/docker.service
    2. 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.

    3. Reload the configuration and restart the service.
      systemctl daemon-reload
      systemctl restart docker
    4. Check the result.
      docker info | grep Cgroup

      The command output is as follows:

      Cgroup Driver: systemd