Microk8s

  1. Install MicroK8s on Linux
sudo snap install microk8s --classic

2. Add your user to the microk8s admin group

sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
su - $USER

3. Check the status while Kubernetes starts

microk8s status --wait-ready

4. Turn on the services you want

microk8s enable dashboard dns ingress

5. Start using Kubernetes

microk8s kubectl get all --all-namespaces
alias mkctl="microk8s kubectl"
mkctl get all -A

6. Access the Kubernetes dashboard

microk8s dashboard-proxy

7. Start and stop Kubernetes to save battery

microk8s start
microk8s stop

8. Multi-node, highly available Kubernetes with MicroK8s

在 ubuntu1 上

microk8s add-node

在 ubuntu2 上

microk8s join 192.168.194.196:25000/24bfc55c51720b62f15caefb95a8f211/c11a38c71679

此时可以看到 ubuntu1 作为 master 节点,ubuntu2 作为 slave 节点

Send a Message