Add latest techniques

This commit is contained in:
Baohua Yang
2026-02-03 11:09:52 -08:00
parent 99e0eb14ce
commit b4b0d4160a
5 changed files with 86 additions and 7 deletions

View File

@@ -1,16 +1,14 @@
# Docker Desktop 启用 Kubernetes
使用 Docker Desktop 可以很方便的启用 Kubernetes由于国内获取不到 `k8s.gcr.io` 镜像我们必须首先解决这一问题
## 获取 `k8s.gcr.io` 镜像
由于国内拉取不到 `k8s.gcr.io` 镜像我们可以使用开源项目 [AliyunContainerService/k8s-for-docker-desktop](https://github.com/AliyunContainerService/k8s-for-docker-desktop) 来获取所需的镜像。
使用 Docker Desktop 可以很方便的启用 Kubernetes
## 启用 Kubernetes
Docker Desktop 设置页面点击 `Kubernetes`选择 `Enable Kubernetes`稍等片刻看到左下方 `Kubernetes` 变为 `running`Kubernetes 启动成功
![](https://github.com/AliyunContainerService/k8s-for-docker-desktop/raw/master/images/k8s.png)
![](https://github.com/docker/docs/raw/main/assets/images/desktop/settings-kubernetes.png)
> 注意Kubernetes 的镜像存储在 `registry.k8s.io`如果国内网络无法直接访问可以在 Docker Desktop 配置中的 `Docker Engine` 处配置镜像加速器或者利用国内云服务商的镜像仓库手动拉取镜像并 retag
## 测试

View File

@@ -28,7 +28,7 @@ After=network.target local-fs.target
[Service]
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/bin/containerd --config //etc/cri-containerd/config.toml
ExecStart=/usr/bin/containerd --config /etc/cri-containerd/config.toml
Type=notify
Delegate=yes