美文网首页
mac m2安装docker desktop自带的k8s

mac m2安装docker desktop自带的k8s

作者: fnbj | 来源:发表于2024-01-28 11:39 被阅读0次

前提

官网下载和安装mac m2芯片版本的docker desktop。

image.png

配置docker镜像仓库

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "debug": true,
  "experimental": true,
  "features": {
    "buildkit": true
  },
  "registry-mirrors": [
    "https://registry.aliyuncs.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn"
  ]
}
image.png

安装k8s

拉取阿里云部署工程

git clone https://github.com/AliyunContainerService/k8s-for-docker-desktop.git

#这里如果打不开github的话,可以替换为
git clone https://hub.nuaa.cf/AliyunContainerService/k8s-for-docker-desktop.git

确定版本(如果使用的是最新版本的docker desktop,则无需执行此过程)

#没有指定版本的需求的话,可以不执行此命令
git checkout v1.21.5

执行脚本

cd k8s-for-docker-desktop
./load_images.sh

启动Kubernetes

在Docker仪表盘上在Settings切到Kubernetes上启动Enabled Kubernetes


image.png

启动成功会看到icon变绿。

在终端里执行kubectl命令使用即可。


image.png

相关文章

网友评论

      本文标题:mac m2安装docker desktop自带的k8s

      本文链接:https://www.haomeiwen.com/subject/weewodtx.html