kubelet: failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"
Error:
kubelet: failed to run Kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"
Image is from datascience |
Solution:
The native.cgroupdriver option specifies the management of the container’s cgroups. You can specify cgroupfs or systemd. If you specify systemd and it is not available, the system uses cgroupfs. By default, if no option is specified, the execdriver first tries systemd and falls back to cgroupfs. This example sets the execdriver to systemd:1. Add following line "--exec-opt native.cgroupdriver=systemd" in /usr/lib/systemd/system/docker.service.
[root@dockerserv ~]# grep -i exec /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd --exec-opt native.cgroupdriver=systemd
ExecReload=/bin/kill -s HUP $MAINPID
You have new mail in /var/spool/mail/root
[root@dockerserv ~]#
2. Reload the Daemon.
[root@dockerserv ~]# systemctl daemon-reload
3. Restart the Docker Service.
[root@dockerserv ~]# service docker restart
Redirecting to /bin/systemctl restart docker.service
[root@dockerserv ~]#
No comments