<p>Am trying to setup <code>kubernetes</code> in <code>centos</code> machine, kubelets start is giving me this error.</p>

<blockquote>
  <p>Failed to get kubelets cgroup: cpu and memory cgroup hierarchy not
  unified. Cpu:/, memory: /system.slice/kubelet.service.</p>
</blockquote>

<p>The cgroup driver I mentioned is systemd for both docker and kubernetes</p>

<p><code>Docker</code> version 1.13.1
<code>Kubernetes</code> version 1.15.2</p>

<p>Can any one suggest the solution.</p>

sasi
<p>This <a href="https://github.com/kubernetes/kubernetes/issues/78950" rel="nofollow noreferrer">issue</a> is fixed in a commit but still not merged see <a href="https://github.com/kubernetes/kubernetes/pull/80121" rel="nofollow noreferrer">this</a></p>

<p>you may try this work around:</p>

<pre><code>sudo vim /etc/sysconfig/kubelet
</code></pre>

<p>add at the end of DAEMON_ARGS string:</p>

<pre><code> --runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice
</code></pre>

<p>restart:</p>

<pre><code>sudo systemctl restart kubelet
</code></pre>

<p>or :</p>

<p>adding a file in : <code>/etc/systemd/system/kubelet.service.d/11-cgroups.conf</code></p>

<p>which contains:</p>

<pre><code>[Service]
CPUAccounting=true
MemoryAccounting=true
</code></pre>

<p>then reload and restart</p>

<pre><code>systemctl daemon-reload &amp;&amp; systemctl restart kubelet
</code></pre>
