docker_practice/kubernetes/setup/docker-desktop.md
Kang HuaiShuai 0ac24829e1
Add enable kubernetes on docker-sektop,close #262
Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
2019-12-09 12:21:52 +08:00

24 lines
1010 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Docker Desktop 启用 Kubernetes
使用 Docker Desktop 可以很方便的启用 Kubernetes由于国内获取不到 `k8s.gcr.io` 镜像我们必须首先解决这一问题
## 获取 `k8s.gcr.io` 镜像
我们可以先从国内镜像 `gcr.azk8s.cn` 拉取镜像再通过 `$ docker tag` 命令重新将镜像标记为 `k8s.gcr.io` 镜像
开源项目 [AliyunContainerService/k8s-for-docker-desktop](https://github.com/AliyunContainerService/k8s-for-docker-desktop) 使用 `powershell` 或 `shell` 脚本简化了以上步骤,建议读者使用该开源项目获取 `k8s.gcr.io` 镜像。
## 启用 Kubernetes
Docker Desktop 设置页面点击 `Kubernetes`选择 `Enable Kubernetes`稍等片刻看到左下方 `Kubernetes` 变为 `running`Kubernetes 启动成功
![](https://github.com/AliyunContainerService/k8s-for-docker-desktop/raw/master/images/k8s.png)
## 测试
```bash
$ kubectl version
```
如果正常输出信息则证明 Kubernetes 成功启动