Upgrading Microk8s

1.18 to 1.19

Posted by on September 28, 2020 · 2 mins read

During June, I installed microk8s 1.18, but then spent most of our warm Rockies summer in the mountains hiking and camping. After getting back to it in September, I wanted to upgrade from Kubernetes 1.18 to 1.19. However with microk8s, upgrades are not supported - specifically see the “Changing channels” section.

Of course, microk8s is not intended for anything more than trial/test/lab workflows so a full re-install should be expected. First step is to remove the old install:

sudo snap remove microk8s

Then I performed the fresh install, this time to version 1.19:

sudo snap install microk8s --classic --channel=1.19/stable
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
tee -a ~/.bash_aliases <<<EOF
alias kubectl='microk8s kubectl'
su - $USER
microk8s status --wait-ready
kubectl cluster-info
kubectl get services

Then deploy the dashboard and make it available from my laptop:

microk8s enable dns storage dashboard ingress 
kubectl label service/kubernetes-dashboard kubernetes.io/cluster-service=true --namespace kube-system
kubectl cluster-info
sudo microk8s.kubectl proxy --accept-hosts=.* --address= &
sudo microk8s.kubectl -n kube-system edit deploy kubernetes-dashboard -o yaml
> In editor, add '- --enable-skip-login' line after '- --namespace=kube-system'

Then browse to:


and click the Skip button:

to see the dashboard:

Back in business with a fresh install of microk8s 1.19.

More in this series…