<p>Can anybody tell me how to set cgroup driver for kubelet in centos7.2?
the official doc doesn't work... <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node</a></p>

<p>details is here: <a href="https://github.com/kubernetes/website/issues/17924" rel="nofollow noreferrer">https://github.com/kubernetes/website/issues/17924</a></p>

Kobe Biello
<p>use the below command</p>

<pre><code>sed -i 's|systemd|cgroupfs|g' /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
</code></pre>

<p>You can also try below approach to set cgroup driver for docker</p>

<pre><code>## Create /etc/docker directory.
mkdir /etc/docker

# Setup daemon.
cat &gt; /etc/docker/daemon.json &lt;&lt;EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ]
}
EOF

mkdir -p /etc/systemd/system/docker.service.d

# Restart Docker
systemctl daemon-reload
systemctl restart docker
</code></pre>
