2025-03-27 MicroK8s Link to heading

Install cluster Link to heading

Tutorial on ubuntu

sudo snap install microk8s --classic
# At time of writing installs 1.32

sudo usermod -a -G microk8s tstephen
newgrp microk8s

microk8s enable dns
microk8s enable dashboard
# not storage as in tutorial (deprecated)
microk8s enable hostpath-storage

microk8s kubectl get all -A

# To access the dashboard use the default token retrieved with:
token=$(microk8s kubectl -n kube-system get secret | grep default-token | cut -d " " -f1)
microk8s kubectl -n kube-system describe secret $token

# use the cluster IP from the dashboard line in kubectl output above
open  https://10.152.183.158

# example app
microk8s kubectl create deployment microbot --image=dontrebootme/microbot:v1
microk8s kubectl scale deployment microbot --replicas=2

# expose as service
microk8s kubectl expose deployment microbot --type=NodePort --port=80 --name=microbot-service

# find microbot svc port (for me 31387)
microk8s kubectl get svc -A

open http://localhost:31387/

microk8s stop

Next steps Link to heading

  • serve a static web site
  • expose the site on your domain
  • configure cluster towork with tailscale