Ubuntu 20.04
Sponsored Link

MicroK8s : Install2020/08/03

 
Install [MicroK8s] that is the Lightweight Kubernetes provided by Canonical.
[1] Install MicroK8s from Snappy.
Snappy is installed and running by default on Ubuntu Server but if it's not running, Start it first by [systemctl start snapd.socket].
root@dlp:~#
snap install microk8s --classic

microk8s v1.18.6 from Canonical installed
[2] After installing MicroK8s, it is running automatically. To stop or start it, set like follows.
# show status

root@dlp:~#
microk8s status

microk8s is running
addons:
ambassador: disabled
cilium: disabled
dashboard: disabled
dns: disabled
fluentd: disabled
gpu: disabled
helm: disabled
helm3: disabled
host-access: disabled
ingress: disabled
istio: disabled
jaeger: disabled
knative: disabled
kubeflow: disabled
linkerd: disabled
metallb: disabled
metrics-server: disabled
multus: disabled
prometheus: disabled
rbac: disabled
registry: disabled
storage: disabled

# show config

root@dlp:~#
microk8s config

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tL...
    server: https://10.0.0.30:16443
  name: microk8s-cluster
contexts:
- context:
    cluster: microk8s-cluster
    user: admin
  name: microk8s
current-context: microk8s
kind: Config
preferences: {}
users:
- name: admin
  user:
    token: THhlZTBNWE1lMDcwenV1THlxNW00eDR0ZGVOdkk5V2Z5c0tMUDAxWkdxWT0K

root@dlp:~#
microk8s kubectl get all

NAME                 TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
service/kubernetes   ClusterIP   10.152.183.1   <none>        443/TCP   3m47s

root@dlp:~#
microk8s kubectl get nodes

NAME            STATUS   ROLES    AGE     VERSION
dlp.srv.world   Ready    <none>   4m10s   v1.18.6-1+64f53401f200a7

# stop MicroK8s

root@dlp:~#
microk8s stop

stop of [microk8s.daemon-apiserver microk8s.daemon-apiserver-kicker microk8s.da…
Stopped.
root@dlp:~#
microk8s status

microk8s is not running. Use microk8s inspect for a deeper inspection.
# start MicroK8s

root@dlp:~#
microk8s start

Started.
# disable MicroK8s

root@dlp:~#
snap disable microk8s

microk8s disabled
# enable MicroK8s

root@dlp:~#
snap enable microk8s

microk8s enabled
Matched Content