By Tcoch

Installing MicroK8s on Debian 12


This article is a quick install guide, without much more information than the official docs.
I still managed to found a problem during the steps that had me puzzled, so let's write it down so it won't be forgotten.

Fresh new VM

First step, getting a VM. AWS, GCP, any provider will do!

Installation of MicroK8s

Then, following the official installation guide (https://microk8s.io/docs/getting-started):
  • I installed snapd
  • And run sudo snap install microk8s --classic --channel=1.32
But of course, here comes a problem.
$ sudo snap install microk8s --classic --channel=1.32/stable
error: cannot perform the following tasks:
- Ensure prerequisites for "microk8s" are available (cannot install snap base "core20": snap "core20" assumes unsupported features: snapd2.61 (try to refresh snapd))

Resolve snapd version problem

At the moment, my snap version is this:
$ snap version
snap    2.57.6-1+b5
snapd   2.57.6-1+b5
series  16
debian  12
kernel  6.1.0-31-amd64
And the error message clearly says snapd2.61 is needed.
But, I'm on a brand new VM, with installation of snapd performed seconds ago. How do I not have the latest version?
$ snap --version
-bash: snap : commande introuvable
$ sudo apt install snapd -y
[...]
$ snap --version
snap    2.57.6-1+b5
snapd   2.57.6-1+b5
series  16
debian  12
kernel  6.1.0-31-amd64
$ sudo snap install snapd
2025-03-04T13:54:05+01:00 INFO Waiting for automatic snapd restart...
snapd 2.67 from Canonical installed
$ snap --version
snap    2.67
snapd   2.67
series  16
debian  12
kernel  6.1.0-31-amd64
Yes, by default, the install of snap isn't really 'complete'... And now, for the installation of MicroK8s...
$ sudo snap install microk8s --classic --channel=1.32
[sudo] Mot de passe de thomas :
microk8s (1.32/stable) v1.32.1 from Canonical installed

Don't forget the extra step for admin privileges

$ microk8s status --wait-ready
microk8s is running
high-availability: no
  datastore master nodes: 127.0.0.1:19001
  datastore standby nodes: none
addons:
  enabled:
    dns                  # (core) CoreDNS
    ha-cluster           # (core) Configure high availability on the current node
    helm                 # (core) Helm - the package manager for Kubernetes
    helm3                # (core) Helm 3 - the package manager for Kubernetes
Articles

Find a random article based on a tag:
Socials