Search code examples
ubuntukubernetesubuntu-18.04windows-subsystem-for-linuxminikube

why systemd is disabled in WSL?


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


Solution

  • 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.