1. 下载Docker

https://www.docker.com/get-started
如果是m1芯片的,记得选择Apple Chip版本的
Docker.jpg

2. 使用Docker Desktop 安装 Kubernetes

在网络良好的情况下进行安装,否则,可能安装不上。。。
Docker.jpg

3. 打开命令行,看是否安装成功

如果展示出如下的信息,则表示安装成功。

  1. ~ kubectl get all;
  2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
  3. service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 136d
  1. ~ kubectl get nodes;
  2. NAME STATUS ROLES AGE VERSION
  3. docker-desktop Ready master 136d v1.19.7
  1. ~ kubectl version
  2. Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"darwin/arm64"}
  3. Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.7", GitCommit:"1dd5338295409edcfff11505e7bb246f0d325d15", GitTreeState:"clean", BuildDate:"2021-01-13T13:15:20Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/arm64"}
  4. WARNING: version difference between client (1.21) and server (1.19) exceeds the supported minor version skew of +/-1