Refine the README for Windows

v1.14.8
Li Yi 5 years ago
parent e2f2396f06
commit ca62a32eca

@ -20,7 +20,7 @@
### Docker Desktop for Mac 开启 Kubernetes ### 开启 Kubernetes
为 Docker daemon 配置镜像加速,参考[阿里云镜像服务](https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors) 或中科大镜像加速地址```https://docker.mirrors.ustc.edu.cn``` 为 Docker daemon 配置镜像加速,参考[阿里云镜像服务](https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors) 或中科大镜像加速地址```https://docker.mirrors.ustc.edu.cn```
@ -33,59 +33,42 @@
预先从阿里云Docker镜像服务下载 Kubernetes 所需要的镜像, 可以通过修改 ```images.properties``` 文件加载你自己需要的镜像 预先从阿里云Docker镜像服务下载 Kubernetes 所需要的镜像, 可以通过修改 ```images.properties``` 文件加载你自己需要的镜像
```bash 在 Mac 上执行如下脚本
./load_images.sh
```
开启 Kubernetes并等待 Kubernetes 开始运行
![k8s](images/k8s.png)
**TIPS**如果在Kubernetes部署的过程中出现问题可以通过docker desktop应用日志获得实时日志信息
```bash
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"
```
### Docker Desktop for Windows 开启 Kubernetes
为 Docker daemon 配置镜像加速,参考[阿里云镜像服务](https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors) 或使用中科大镜像加速地址 ```https://docker.mirrors.ustc.edu.cn```
![mirror](images/mirror_win.png)
可选操作: 为 Kubernetes 配置 CPU 和 内存资源,建议分配 4GB 或更多内存。
![resource](images/resource_win.png)
预先从阿里云Docker镜像服务下载 Kubernetes 所需要的镜像, 可以通过修改 ```images.properties``` 文件加载你自己需要的镜像
使用 Bash shell
```bash ```bash
./load_images.sh ./load_images.sh
``` ```
使用 PowerShell
在Windows上使用 PowerShell
```powershell ```powershell
.\load_images.ps1 .\load_images.ps1
``` ```
说明: 如果因为安全策略无法执行 PowerShell 脚本,请在 “以管理员身份运行” 的 PowerShell 中执行 ```Set-ExecutionPolicy RemoteSigned``` 命令。 说明: 如果因为安全策略无法执行 PowerShell 脚本,请在 “以管理员身份运行” 的 PowerShell 中执行 ```Set-ExecutionPolicy RemoteSigned``` 命令。
开启 Kubernetes并等待 Kubernetes 开始运行 开启 Kubernetes并等待 Kubernetes 开始运行
![k8s](images/k8s_win.png)
开启 Kubernetes并等待 Kubernetes 开始运行
![k8s](images/k8s.png)
**TIPS** **TIPS**
* 如果在Kubernetes部署的过程中出现问题可以在 C:\ProgramData\DockerDesktop下的service.txt 查看Docker日志 在Mac上:
* 如果看到 Kubernetes一直在启动状态请参考 [Issue 3769(comment)](https://github.com/docker/for-win/issues/3769#issuecomment-486046718) 和 [Issue 1962(comment)](https://github.com/docker/for-win/issues/1962#issuecomment-431091114)
如果在Kubernetes部署的过程中出现问题可以通过docker desktop应用日志获得实时日志信息
```bash
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"
```
在Windows上:
如果在Kubernetes部署的过程中出现问题可以在 C:\ProgramData\DockerDesktop下的service.txt 查看Docker日志;
如果看到 Kubernetes一直在启动状态请参考 [Issue 3769(comment)](https://github.com/docker/for-win/issues/3769#issuecomment-486046718) 和 [Issue 1962(comment)](https://github.com/docker/for-win/issues/1962#issuecomment-431091114)
### 配置 Kubernetes ### 配置 Kubernetes

@ -16,7 +16,7 @@ NOTE:
* For Kubernetes v1.10.11, please use the v1.10.11 branch ```git checkout v1.10.11``` * For Kubernetes v1.10.11, please use the v1.10.11 branch ```git checkout v1.10.11```
### Enable Kubernetes on Docker Desktop for Mac ### Enable Kubernetes on Docker Desktop
Config registry mirror for Docker daemon with ```https://docker.mirrors.ustc.edu.cn``` only if in China Config registry mirror for Docker daemon with ```https://docker.mirrors.ustc.edu.cn``` only if in China
@ -28,36 +28,13 @@ Optional: config the CPU and memory for Kubernetes, 4GB RAM or more is suggested
Preload Kubernetes images form Alibaba Cloud Registry Service, NOTE: you can modify the ```images.properties``` for your own images Preload Kubernetes images form Alibaba Cloud Registry Service, NOTE: you can modify the ```images.properties``` for your own images
On Mac, execute the following scripts
```bash ```bash
./load_images.sh ./load_images.sh
``` ```
Enable Kubernetes in Docker for Mac, and wait a while for Kubernetes is running Or on Windows, execute the following scripts in PowerShell
![k8s](images/k8s.png)
### Enable Kubernetes on Docker Desktop for Windows
Config registry mirror for Docker daemon with ```https://docker.mirrors.ustc.edu.cn``` only if in China
![mirror](images/mirror_win.png)
Optional: config the CPU and memory for Kubernetes, 4GB RAM or more is suggested.
![resource](images/resource_win.png)
Preload Kubernetes images form Alibaba Cloud Registry Service, NOTE: you can modify the ```images.properties``` for your own images
In Bash shell
```bash
./load_images.sh
```
or in PowerShell of Windows
```powershell ```powershell
.\load_images.ps1 .\load_images.ps1
@ -65,9 +42,10 @@ or in PowerShell of Windows
NOTE: if you failed to start PowerShell scripts for security policy, please execute ```Set-ExecutionPolicy RemoteSigned``` command in PowerShell with "Run as administrator" option. NOTE: if you failed to start PowerShell scripts for security policy, please execute ```Set-ExecutionPolicy RemoteSigned``` command in PowerShell with "Run as administrator" option.
Enable Kubernetes in Docker for Windows, and wait a while for Kubernetes is running
![k8s](images/k8s_win.png) Enable Kubernetes, and wait a while for Kubernetes is running
![k8s](images/k8s.png)
### Config Kubernetes ### Config Kubernetes

Loading…
Cancel
Save