<p>I'm trying to install Kubernetes on an EC2 instance running Ubuntu 20.04.</p>
<p>I ran the following commands to install Kubeadm and Docker.</p>
<pre><code>sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo &quot;deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main&quot; | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
sudo snap install docker
sudo kubeadm init
</code></pre>
<p>When I try to run Kubeadm init in order to initialize my Kubernetes control node, I get the following error:</p>
<pre><code>[init] Using Kubernetes version: v1.23.4
[preflight] Running pre-flight checks
    [WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR Service-Docker]: docker service is not active, please run 'systemctl start docker.service'
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
</code></pre>
<p>I subsequently checked to see if Docker was properly installed and pulled an Ubuntu 20.04 docker image and successfully ran it in interactive mode. So, I'm sure that Docker is running.</p>
<p>Does anyone have an idea as to what might be the issue?</p>
<p>My Kubeadm version is:</p>
<pre><code>kubeadm version: &amp;version.Info{Major:&quot;1&quot;, Minor:&quot;23&quot;, GitVersion:&quot;v1.23.4&quot;, GitCommit:&quot;e6c093d87ea4cbb530a7b2ae91e54c0842d8308a&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2022-02-16T12:36:57Z&quot;, GoVersion:&quot;go1.17.7&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
</code></pre>
<p>My Docker version is:</p>
<pre><code>Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2
</code></pre>

Campbell Hutcheson
<p>The issue was that I installed docker using snap.</p>
<p>This creates a service name that seems to cause issues with Kubernetes.</p>
<p>Install docker for Ubuntu 20.04 using directions <a href="https://docs.docker.com/engine/install/ubuntu/" rel="nofollow noreferrer">on the official Docker website</a> with apt-get. This seems to work.</p>
