# Install MicroK8s on WSL2

**URL:** <https://discuss.kubernetes.io/t/install-microk8s-on-wsl2/22877>\
**Category:** microk8s\
**Tags:** docs\
**Created:** [January 30, 2023, 1:19am UTC](https://discuss.kubernetes.io/t/install-microk8s-on-wsl2/22877 "2023-01-30T01:19:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neoaggelos](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/neoaggelos/32/9019_2.png) [@neoaggelos](https://discuss.kubernetes.io/u/neoaggelos)\
**Post date:** [January 30, 2023, 1:19am UTC](https://discuss.kubernetes.io/t/install-microk8s-on-wsl2/22877/1 "2023-01-30T01:19:11Z")

</div>

## Install MicroK8s on WSL2

The Windows Subsystem For Linux Version 2 (also known as **WSL2** ) supports running Ubuntu with systemd as the init process. This enables running snap (and MicroK8s!) natively on Windows hosts.

1. [**Install WSL2**](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine following the instructions from Microsoft. Ensure that the installation completed successfully. Troubleshooting issues around WSL2 are beyond the scope of this document, but you will find lots of information on the WSL2 link above if you run into problems.

2. **Update WSL to the latest version** and ensure WSL2 is set as the default version:

3. **Install Ubuntu** and wait for the machine to come up. Configure your username and password for the Ubuntu instance. Below, we choose username `ubuntu`:

4. **Enable systemd** by running the following command in the WSL terminal:

5. **Exit the WSL terminal, then restart WSL**.

From this point, `systemd` is enabled and snaps should work properly. You can list the installed snaps with

```auto
sudo snap list

```

1. **Install MicroK8s**.

2. **Wait for MicroK8s to start**.

3. **Enable services and start using Kubernetes**!

### What next?

- Want to experiment with alpha releases of Kubernetes? [See the documentation on setting channels](https://discuss.kubernetes.io/t/selecting-a-snap-channel/11270).
- Need to tweak the Kubernetes configuration? [Find out how to configure the Kubernetes services](https://discuss.kubernetes.io/t/services-and-ports/11263).
- Having problems? Check out our [troubleshooting section](https://discuss.kubernetes.io/t/troubleshooting/11267).
- Love MicroK8s? Want to contribute or suggest a feature? [Give us your feedback](https://discuss.kubernetes.io/t/get-in-touch/11261).
