1.在docker hub上下载docker.dmg文件并进行安装
2.查看当前docker 版本信息及k8s版本号
3.下载阿里云镜像脚本文件
git clone https://github.com/AliyunContainerService/k8s-for-docker-desktop.git
4.切换k8s对应版本号分支
5.配置docker Engine(使用中科大镜像加速地址https://docker.mirrors.ustc.edu.cn)
{
"experimental": true,
"insecure-registries": [
"hub.zhubaoe.cn:5555",
"134.175.60.198:5555"
],
"debug": true,
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn"
]
}
6.修改docker 配置信息建议(2核,4g)
7.执行./load_images.sh 脚本命令(拉取阿里镜像及替换对应名称)
8.开启在docker设置中开启k8s
9.查看运行日志(特别重要**)
pred='process matches ".*(ocker|vpnkit).*"
|| (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
/usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
参考文献
https://github.com/AliyunContainerService/k8s-for-docker-desktop
网友评论