<p>I'm trying to setup Kubernetes cluster with multi master and external etcd cluster. Followed these steps as described in <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/" rel="nofollow noreferrer">kubernetes.io</a>. I was able to create static manifest pod files in all the 3 hosts at /etc/kubernetes/manifests folder after executing Step 7.</p>

<p>After that when I executed command '<strong>sudo kubeadmin init</strong>', the initialization got failed because of kubelet errors. Also verified journalctl logs, the error says misconfiguration of cgroup driver which is similar to this <a href="https://stackoverflow.com/questions/45708175/kubelet-failed-with-kubelet-cgroup-driver-cgroupfs-is-different-from-docker-c">SO link</a>. </p>

<p>I tried as said in the above SO link but not able to resolve. </p>

<p>Please help me in resolving this issue.</p>

<p>For installation of docker, kubeadm, kubectl and kubelet, I followed kubernetes.io site only.</p>

<p><strong>Environment:</strong></p>

<p>Cloud: AWS </p>

<p>EC2 instance OS: Ubuntu 18.04</p>

<p>Docker version: 18.09.7</p>

<p>Thanks</p>

Naresh M
<p>After searching few links and doing few trails, I am able to resolve this issue.</p>
<p>As given in the Container runtime <a href="https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker" rel="nofollow noreferrer">setup</a>, the Docker cgroup driver is systemd. But default cgroup driver of Kubelet is cgroupfs. So as Kubelet alone cannot identify cgroup driver automatically (as given in <a href="https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/#providing-instance-specific-configuration-details" rel="nofollow noreferrer">kubernetes.io</a> docs), we have to provide cgroup-driver externally while running Kubelet like below:</p>
<blockquote>
<p>cat &lt;&lt; EOF &gt; /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf</p>
<p>[Service]</p>
<p>ExecStart=</p>
<p>ExecStart=/usr/bin/kubelet <strong>--cgroup-driver=systemd</strong> --address=127.0.0.1 --pod-&gt;manifest-path=/etc/kubernetes/manifests</p>
<p>Restart=always</p>
<p>EOF</p>
<p>systemctl daemon-reload</p>
<p>systemctl restart kubelet</p>
</blockquote>
<p>Moreover, no need to run sudo kubeadm init, as we are providing --pod-manifest-path to Kubelet, it runs etcd as Static POD.</p>
<p>For debugging, logs of Kubelet can be checked using below command</p>
<blockquote>
<p>journalctl -u kubelet -r</p>
</blockquote>
<p>Hope it helps. Thanks.</p>
