sudo snap install microk8s --classic
Don’t have the snap command? Get set for snaps
MicroK8s creates a group to enable seamless usage of commands which require admin privilege. Use the following commands to join the group:
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
You will also need to re-enter the session for the group update to take place:
su - $USER
microk8s status --wait-ready
microk8s enable dashboard dns ingress
Try microk8s enable --help for a list of available services and optional features. microk8s disable ‹name› turns off a service.
microk8s kubectl get all --all-namespaces
If you mainly use MicroK8s you can make our kubectl the default one on your command-line with alias mkctl=”microk8s kubectl”. Since it is a standard upstream kubectl, you can also drive other Kubernetes clusters with it by pointing to the respective kubeconfig file via the “--kubeconfig” argument.
microk8s dashboard-proxy
Kubernetes is a collection of system services that talk to each other all the time. If you don’t need them running in the background then you will save battery by stopping them. microk8s start and microk8s stop will do the work for you