Cheat Sheet

Microk8s tips and tricks

Install

Latest

snap install microk8s --classic

Specific version

snap install microk8s --classic --channel=1.17/stable

Set group

sudo usermod -a -G microk8s $USER

Logout from your workstation session and login again.

Useful commands

Get kubeconfig

microk8s.config > $HOME/.kube/config

Reset cluster

microk8s reset --destroy-storage

References

https://microk8s.io/docs/commands

Built-in Registry

Push

Pushing to this insecure registry may fail in some versions of Docker unless the daemon is explicitly configured to trust this registry. To address this we need to edit /etc/docker/daemon.json and add:

Then restart docker.

Enable registry, build and push image.

Deploy it.

Remove

Run on your workstation:

Then run:

Local private registry

Allow insecure registry:

Restart docker.

Stop microk8s, backup and edit config file.

Add the following section.

Start microk8s.

Start local registry.

Tag and push image.

Test it.

References

https://microk8s.io/docs/registry-private

Last updated