why systemd is disabled in WSL? why systemd is disabled in WSL? kubernetes kubernetes

why systemd is disabled in WSL?


Systemd is not supported in WSL at this time. More information can be found with this GitHub issue.

Furthermore, Docker does not (at the time of writing this) work on top of WSL, which means Kubelet won't be of much use. In order to run Kubernetes locally, you can use Docker for Windows which includes Kubernetes support, or you can use Minikube to run a VM with Hyper-V or Virtualbox.


Nowadays you can try:

sudo service docker start

when using WSL2, if you are running on windows version 2004 or higher (I assume).


Windows Subsystem for Linux (WSL) 2 introduces a significantarchitectural change as it is a full Linux kernel built by Microsoft,allowing Linux containers to run natively without emulation.

Before you install the Docker Desktop WSL 2 backend, you must completethe following steps:

Install Windows 10, version 1903 or higher. Enable WSL 2 feature onWindows.

Source - Docker Desktop WSL 2 backend

To find out which version of Windows your device is running, press the Windows logo key + R, type winver in the Open box, and then select OK.

Systemd is NOT supported in WSL but there is a workaround for this - Script to enable systemd support on current Ubuntu WSL2 images from the Windows store.