新技能GET:如何在Windows和MacOS上安装Kubernetes

liam zheng

on July 21, 2020

您在寻找一个可以在Windows或Mac上运行的Kubernetes方案吗?MicroK8s是一个轻量级,CNCF认证的Kubernetes发行版,支持Linux、Windows、MacOS平台。一个单一的安装包即包含了所有Kubernetes服务和精心挑选的组件集。

MicroK8s资源占用率低,可单节的Kubernetes点或者多节点集群使用。它使得团队可以小范围内测试微服务,开发和测试机器学习(AI/ML)模型,构建CI-CD管道或者在物联网和边缘设备嵌入可升级的Kubernetes。

MicroK8可以自动执行Kubernetes的典型功能(例如调度,缩放和调试),同时还可以通过预先打包诸如DNS,Kubernetes仪表板和Istio之类的附件来抽象其复杂性。另外,MicroK8s跟随上游的Kubernetes发行节奏,这使得在官方版本发布后几天内,新的MicroK8s即将可用。

Kubernetes安装步骤

下面是在Windows、MacOS安装和与MicroK8s交互,访问仪表的必要步骤。

Windows平台

步骤一:下载Windows版安装助手

从GitHub下载.exe文件

步骤二:运行安装助手

步骤三:打开CMD

按住Windows键+R,输入cmd,再回车。

步骤四:检查MicroK8s的状态

microk8s status --wait-ready

步骤五:启用仪表组件

microk8s enable dashboard

步骤六:访问Kubernetes仪表

microk8s dashboard-proxy

MacOS平台

步骤一:安装MicroK8s

brew install ubuntu/microk8s/microk8s 
microk8s install

如果您还没安装brew命令,那么可从Homebrew官网获取。

步骤二:检查MicroK8s状态

microk8s status --wait-ready

步骤三:启用仪表组件

microk8s enable dashboard

步骤四:访问Kubernetes仪表

microk8s dashboard-proxy

总结

MicroK8s为在Windows工作站上使用Kubernetes提供了一种简易的安装方式。对于大规模使用,MicroK8s节点可集群化。了解更多关于集群化和其他MicroK8s的高级配置,请继续阅读和探索MicroK8s的官方文档

扩展阅读

Newsletter signup

Select topics you’re
interested in

In submitting this form, I confirm that I have read and agree to Canonical’s Privacy Notice and Privacy Policy.

Related posts

We are changing the way you build snaps from GitHub repos

On the 11th March 2020 we introduced a new process for building a snap using GitHub repos to snapcraft.io. Here is all you need to know about this update....

GNOME 3.34 snapcraft extension

We constantly strive to empower developers. Part of that aim extends to making development easier, for example improving build tools and documentation. As an...

An adventure through the Snap Store

An application store with a large number of entries is a double-edged sword. It’s often a good sign of a vibrant, thriving community of software creators,...