在ubuntu上运行microk8s

在ubuntu上运行microk8s #

不可抗拒的理由 #

Reliable, fast, small, upstream.

  • Fast install Get a full Kubernetes system running in under 60 seconds.

  • Secure Runs safely on your laptop with state of the art isolation.

  • Upstream CNCF binaries delivered to your laptop, with updates and upgrades.

  • Complete Includes a docker registry so you can make containers, push them, and deploy them all on your laptop.

  • Featureful Cool things you probably want to try on a small, standard K8s are all built-in. Just enable them and go.

  • Updates Get the daily build if you want it, or betas and milestones, or just stable point releases.

  • Upgrades When a new major version comes out, upgrade with a single command (or automatically).

  • GPGPU Passthrough Give MicroK8s a GPGPU and your docker containers can get all nice and CUDA.

  • Small Use MicroK8s in your CI/CD pipelines and get on with your day without headaches.

初始化步骤 #

snap安装,目前没有国内源,最好自带翻墙哟~
# 安装
sudo snap install microk8s --classic --channel=1.18/stable
# 等待ready
sudo microk8s status --wait-ready
# 开启组件
sudo microk8s enable dns dashboard registry

dashboard #

microk8s kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443 --address 0.0.0.0