How to install MicroK8s on Bazzite?
I tryed use snap
and brew
to install microk8s
.
but cannot open microk8s
I’m on Aurora, but I don’t think snap
is installed in Bazzite?
snap
is the equivalent of flatpak
in Ubuntu and its flavours. It’s rare to see it in other distributions. There is no need for snap
in Universal Blue desktops (Aurora, Bazzite, Bluefin), because they have flatpak
for GUI apps and brew
for terminal tools.
As far I know, snap
is the only way to install microk8s
. To install snap
, you would probably need to layer it on the filesystem with rpm-ostree
, and one of the goals of Universal Blue is to avoid this. (I joined the Universal Blue community just 2 weeks ago so I don’t know much about that.)
Why do you need microk8s
? There are alternatives, because everything’s already in place to run containers, and the following tools use containers to run a Kubernetes cluster:
kind
: installed in DX (Developer Experience) versions of Aurora and Bluefin, probably in Bazzite DX; installable with anujust
task (ujust install-k8s-dev-tools
in DX images)minikube
: installable withbrew
k3d
: my personal favorite, installable withbrew
I tested all three for my needs (preparing to pass the 3 Kubernetes certifications) and I use k3d
because it’s the fastest, has many features already baked-in (Metrics API, Ingress support, load balancer), is the easiest to use, is also the most scriptable (configuration by YAML manifest) and has the smallest footprint. k3d
deploys a k3s
cluster as Docker containers, k3s
being designed for small computing resources requirements. It’s also the Kubernetes distribution that is installed by Rancher Desktop, the free and Open Source alternative to Docker Desktop.
Managing it is really different than a standard Kubernetes cluster, however, so I also used Minikube in some cases (where I had to practice on kubeadm
).
I have never used any other K8s except microK8s times.
It seems easier to add “node worker” to microk8s.
If other k8s are easier to use, I will use other.
I see see K3d now.
Thank you
I never used microk8s myself even though I was on Ubuntu until 2-3 weeks ago (I never was a fan of snap
). It does seem to have nice features. k3d has less features, but we can install anything with Helm. It can be installed with brew
.
The k3d
cli has options to create “agents”, which are worker nodes, for example this will create a cluster with 1 control plane node (“server”) and 2 worker nodes (“agents”):
❯ k3d cluster create test-cluster --agents 2
4 containers will be created, one being the load balancer (“serverlb”):
❯ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d59e1925a361 ghcr.io/k3d-io/k3d-proxy:5.8.3 "/bin/sh -c nginx-pr…" 21 seconds ago Up 15 seconds 80/tcp, 0.0.0.0:43231->6443/tcp k3d-test-cluster-serverlb
84843707e979 rancher/k3s:v1.31.5-k3s1 "/bin/k3d-entrypoint…" 21 seconds ago Up 17 seconds k3d-test-cluster-agent-1
26a2c0aa35ba rancher/k3s:v1.31.5-k3s1 "/bin/k3d-entrypoint…" 21 seconds ago Up 17 seconds k3d-test-cluster-agent-0
c45dac3f6a64 rancher/k3s:v1.31.5-k3s1 "/bin/k3d-entrypoint…" 21 seconds ago Up 19 seconds k3d-test-cluster-server-0
Cluster creation is fast. 14 seconds on my AMD Ryzen 7 5700X. What I like about k3d
is that after resume from sleep, and after rebooting, the cluster will still be functional. Yet I can shut it down and restart it later, and it will still be fully functional, contrarily to kind
(at least it was the case 2 years ago).
And the footprint is small (note that the Metrics Server is an always-included addon):
❯ kubectl top node
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
k3d-test-cluster-agent-0 32m 0% 159Mi 0%
k3d-test-cluster-agent-1 36m 0% 165Mi 0%
k3d-test-cluster-server-0 18m 0% 480Mi 1%
❯ kubectl top po -A --sum
NAMESPACE NAME CPU(cores) MEMORY(bytes)
kube-system coredns-ccb96694c-lfxq7 1m 16Mi
kube-system local-path-provisioner-5cf85fd84d-p8vcr 1m 7Mi
kube-system metrics-server-5985cbc9d7-lj5zk 2m 21Mi
kube-system svclb-traefik-2f4a8d1b-2l2vd 0m 0Mi
kube-system svclb-traefik-2f4a8d1b-jb6tc 0m 0Mi
kube-system svclb-traefik-2f4a8d1b-t4crh 0m 0Mi
kube-system traefik-5d45fc8cc9-vmbp4 1m 36Mi
________ ________
4m 82Mi
Managing it does need some learning though. It has many differences from a standard Kubernetes cluster, but not where it counts (deploying and managing apps).
The k3d
tool is documented at k3d.io but it’s a CLI to deploys k3s
clusters, and the documentation for k3s
is at docs.k3s.io.
Have you used AI to manage k8s?
If so, is there any good introduction?
Not yet! We’re in the process of deploying a Kubernetes-based platform at work, and at home I haven’t tried AI with k8s yet. (I just have an old 2 core laptop on which I run k3s on Ubuntu Server, and just bought an old ultra small form factor PC to replace it. But I’m still reading docs on installing uCore, bootc and managing Fedora Core OS )
The issue is often adequate GPUs to run AI. So I’ll have to explore agentic AI in k8s on my NVIDIA GPU-equipped PC.
I’m certainly going to have a look at: