why systemd is disabled in WSL?

Santosh Hegde picture Santosh Hegde · Apr 8, 2019 · Viewed 32.9k times · Source

None of the systemd commands are working inside WSL( Ubuntu Bash 18.04). When I ran sudo systemctl is-active kubelet, error is output: System has not been booted with systemd as init system (PID 1). Can't operate. : running command: sudo systemctl is-active kubelet

How to enable systemd feature in WSL? Whats the way to get rid of System has not been booted with systemd

Answer

DWSR picture DWSR · Apr 9, 2019

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.