---
title: Installing MicroK8s on a Raspberry Pi
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical.com/microk8s/docs/install-raspberry-pi
---

*Submit*

# Installing MicroK8s on a Raspberry Pi

**Note:** Running Kubernetes generates significant I/O pressure on storage. Using a USB stick or low-end SD card as primary storage is not recommended when running MicroK8s. To diagnose slow disk performance on Raspberry Pi, see the [troubleshooting section](https://canonical.com/microk8s/docs/troubleshooting).

## [Verify and enable memory cgroups](https://canonical.com/microk8s/docs/install-raspberry-pi#p-36170-verify-and-enable-memory-cgroups)

MicroK8s requires memory cgroups. On recent Ubuntu releases for Raspberry Pi (Ubuntu 24.04 LTS and newer), memory cgroups are usually enabled by default, whereas on Raspberry Pi OS and older Ubuntu releases they are disabled by default.

You can check if memory cgroups are already active by running:

```
grep memory /sys/fs/cgroup/cgroup.controllers
```

Note: The command above applies to systems using cgroup v2. On distributions that use cgroup v1 or a hybrid hierarchy, check for the `/sys/fs/cgroup/memory` directory instead.

If `memory` is not listed in the output, enable it by editing your kernel command line file:

* Raspberry Pi OS (Bookworm and later) / Ubuntu 24.04 LTS and earlier:

  ```
  sudo vi /boot/firmware/cmdline.txt
  ```
* Raspberry Pi OS (Bullseye and earlier):

  ```
  sudo vi /boot/cmdline.txt
  ```
* Ubuntu 25.10 and 26.04 LTS+ (A/B boot layout):

  ```
  sudo vi /boot/firmware/current/cmdline.txt
  ```

Note: In some older Raspberry Pi and Ubuntu distributions, the boot parameters are in `/boot/firmware/nobtcmd.txt`.

Append the following parameter to the end of the existing line:

```
cgroup_enable=memory
```

## [Kernel modules (Ubuntu 22.04 LTS and earlier only)](https://canonical.com/microk8s/docs/install-raspberry-pi#p-36170-kernel-modules-ubuntu-2204-lts-and-earlier-only)

On Ubuntu 24.04 LTS and newer, the required kernel modules are included by default in `linux-raspi`. For Ubuntu versions before 24.04, install the extra kernel modules package:

```
sudo apt install linux-modules-extra-raspi
```

Modifying the `cmdline.txt` or updating kernel modules requires a reboot to take effect. Reboot the Raspberry Pi to apply the changes:

```
sudo reboot
```

## [Install MicroK8s](https://canonical.com/microk8s/docs/install-raspberry-pi#p-36170-install-microk8s)

Install the MicroK8s snap:

```
sudo snap install microk8s --classic --channel=1.36/stable
```

Last updated 3 days ago. [Help improve this document in the forum](https://discuss.kubernetes.io/t/installing-microk8s-on-a-raspberry-pi/21542).
