MicroK8S setup - Ubuntu 22.04

Wed, 15 June 2022

setup.md
MicroK8s

Install Ubuntu 22.04 (64 bit).
SSH into the box (username "ubuntu" and password "ubuntu"). Change the password as requested.
Add your SSH key to the authorized_keys file
Edit the hostname (nano /etc/hostname). For example: 'microk8s-master' or 'microk8s-worker-1' etc...

sudo apt-get update
sudo apt-get upgrade -y
sudo apt install -y linux-modules-extra-raspi

sudo nano /boot/firmware/cmdline.txt

Add this to the end of the file:
cgroup_enable=memory cgroup_memory=1

sudo snap install microk8s --classic --channel=1.21/stable

NOT AS SUDO:
mkdir ~/.kube && sudo usermod -a -G microk8s ubuntu && sudo chown -f -R ubuntu ~/.kube && newgrp microk8s

Join the nodes into the master

Other required setup (at cluster level)...

microk8s.enable dashboard dns ingress registry storage
sudo microk8s kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.8.0/cert-manager.yaml