root@raspberrypi4-1:~# apt update && apt upgrade -y
root@raspberrypi4-1:~# apt install snapd
root@raspberrypi4-1:~# systemctl enable --now snapd.socket
root@raspberrypi4-1:~# adduser pikube
root@raspberrypi4-1:~# usermod -a -G sudo pikube
root@raspberrypi4-1:~# su - pikube
### add cgroup_enable=memory cgroup_memory=1 to the line in /boot/cmdline.txt
pikube@raspberrypi4-1:~ $ sudo vi /boot/cmdline.txt
pikube@raspberrypi4-1:~ $ sudo snap install microk8s --classic
pikube@raspberrypi4-1:~ $ alias kubectl='microk8s kubectl'
pikube@raspberrypi4-1:~ $ sudo usermod -a -G microk8s pikube
pikube@raspberrypi4-1:~ $ sudo chown -f -R pikube ~/.kub
pikube@raspberrypi4-1:~ $ microk8s start
Started.
pikube@raspberrypi4-1:~ $ microk8s enable dns:192.168.1.1
Enabling DNS
Applying manifest
serviceaccount/coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created
clusterrole.rbac.authorization.k8s.io/coredns created
clusterrolebinding.rbac.authorization.k8s.io/coredns created
Restarting kubelet
DNS is enabled
pikube@raspberrypi4-1:~ $ microk8s enable storage