没有systemd命令在WSL内部工作(Ubuntu Bash 18.04)。当我跑sudo systemctl is-active kubelet
时,错误是output: System has not been booted with systemd as init system (PID 1). Can't operate.
: running command: sudo systemctl is-active kubelet
如何在WSL中启用systemd功能?什么是摆脱System has not been booted with systemd
的方式
目前,WSL不支持Systemd。更多信息可以在with this GitHub issue找到。
此外,Docker没有(在撰写本文时)在WSL之上工作,这意味着Kubelet将没有多大用处。为了在本地运行Kubernetes,您可以使用包含Kubernetes支持的Docker for Windows,或者您可以使用Minikube来运行具有Hyper-V或Virtualbox的VM。