# Problem in setting up Kubernetes in WSL (Failed to start docker.service: Unit docker.service not found)

**URL:** https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733
**Category:** Windows
**Created:** [September 6, 2020, 3:29pm UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733 "2020-09-06T15:29:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Avinash\_S](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/avinash_s/32/2887_2.png) [@Avinash\_S](https://discuss.kubernetes.io/u/Avinash_S)
#### Post date: [September 6, 2020, 3:29pm UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/1 "2020-09-06T15:29:06Z")

</div>

I am following this procedure to setup Kubernetes in WSL: [WSL Kubernetes Setup](https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/)

I proceeded to setup kubernetes using Minikube. After the step of **enabling SystemD** , when I run,

> sudo minikube start --driver=none

I get the following error,

> Exiting due to RT\_DOCKER\_EXIT\_5: sudo systemctl start docker: exit status 5  
> stdout:
> 
> stderr:  
> Failed to start docker.service: Unit docker.service not found.

What should be done to resolve this?

---

<div class="post-metadata">

### Author: ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)
#### Post date: [September 6, 2020, 7:35pm UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/2 "2020-09-06T19:35:04Z")

</div>

You need to install docker:

```auto
sudo apt install docker.io

```

Kind regards,  
Stephen

---

<div class="post-metadata">

### Author: ![Avinash\_S](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/avinash_s/32/2887_2.png) [@Avinash\_S](https://discuss.kubernetes.io/u/Avinash_S)
#### Post date: [September 7, 2020, 4:28pm UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/3 "2020-09-07T16:28:43Z")

</div>

Is it necessary to install docker locally in the wsl? I already have docker for windows and wsl integration enabled.

---

<div class="post-metadata">

### Author: ![shayanjalil](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/shayanjalil/32/5958_2.png) [@shayanjalil](https://discuss.kubernetes.io/u/shayanjalil)
#### Post date: [October 1, 2020, 8:22am UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/5 "2020-10-01T08:22:49Z")

</div>

@stephendotcarter as mentioned by @Avinash_S, the tutorial at [WSL Kubernetes Setup](https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/) explicitly mentions that there is no need to install docker on WSL, minikube should use the docker installation on the host Windows system. I’m facing the exact same issue and cannot figure it out

---

<div class="post-metadata">

### Author: ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)
#### Post date: [October 1, 2020, 9:00am UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/6 "2020-10-01T09:00:46Z")

</div>

Did you follow this part of the guide to integrate Docker in to the WSL distro?

```auto
In order to fix it, and finally be able to use the commands, we need to tell the Docker Desktop to "attach" itself to our distro also:

```

Kind regards,  
Stephen

---

<div class="post-metadata">

### Author: ![shayanjalil](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/shayanjalil/32/5958_2.png) [@shayanjalil](https://discuss.kubernetes.io/u/shayanjalil)
#### Post date: [October 1, 2020, 11:37am UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/7 "2020-10-01T11:37:25Z")

</div>

@stephendotcarter yes I did. Docker works fine otherwise on WSL. I can run containers and everything. The issue is just when starting minikube.  
Seems like the Host docker installation doesn’t register itself as a service inside WSL, and minikube is relying on that. I cannot find a work around for this

---

<div class="post-metadata">

### Author: ![stephendotcarter](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/stephendotcarter/32/4528_2.png) [@stephendotcarter](https://discuss.kubernetes.io/u/stephendotcarter)
#### Post date: [October 1, 2020, 1:18pm UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/8 "2020-10-01T13:18:59Z")

</div>

Checkout this thread:

> <https://github.com/kubernetes/minikube/issues/8568>
>
> ~$ sudo minikube start
> 😄 minikube v1.11.0 on Ubuntu 18.04
> ✨ Using the none driver based on existing profile
> 👍 Starting control plane node...

I had the same error as you and got it to work using:

```auto
minikube start --driver=docker

```

Kind regards,  
Stephen

---

<div class="post-metadata">

### Author: ![shayanjalil](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/shayanjalil/32/5958_2.png) [@shayanjalil](https://discuss.kubernetes.io/u/shayanjalil)
#### Post date: [October 2, 2020, 7:33am UTC](https://discuss.kubernetes.io/t/problem-in-setting-up-kubernetes-in-wsl-failed-to-start-docker-service-unit-docker-service-not-found/12733/9 "2020-10-02T07:33:24Z")

</div>

@stephendotcarter thank you! this worked for me
