From ca62a32eca1bcb32794693632317cbc19e49e19d Mon Sep 17 00:00:00 2001 From: Li Yi Date: Sun, 24 Nov 2019 09:18:53 +0800 Subject: [PATCH] Refine the README for Windows --- README.md | 55 ++++++++++++++++++---------------------------------- README_en.md | 34 ++++++-------------------------- 2 files changed, 25 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 7723b48..0a9d63a 100644 --- a/README.md +++ b/README.md @@ -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``` @@ -33,59 +33,42 @@ 预先从阿里云Docker镜像服务下载 Kubernetes 所需要的镜像, 可以通过修改 ```images.properties``` 文件加载你自己需要的镜像 -```bash -./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 +在 Mac 上执行如下脚本 ```bash ./load_images.sh ``` -使用 PowerShell + +在Windows上,使用 PowerShell ```powershell .\load_images.ps1 ``` 说明: 如果因为安全策略无法执行 PowerShell 脚本,请在 “以管理员身份运行” 的 PowerShell 中执行 ```Set-ExecutionPolicy RemoteSigned``` 命令。 - 开启 Kubernetes,并等待 Kubernetes 开始运行 -![k8s](images/k8s_win.png) + +开启 Kubernetes,并等待 Kubernetes 开始运行 +![k8s](images/k8s.png) **TIPS**: -* 如果在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) +在Mac上: + +如果在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 diff --git a/README_en.md b/README_en.md index 4e43a86..ce7faf0 100644 --- a/README_en.md +++ b/README_en.md @@ -16,7 +16,7 @@ NOTE: * 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 @@ -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 +On Mac, execute the following scripts ```bash ./load_images.sh ``` -Enable Kubernetes in Docker for Mac, and wait a while for Kubernetes is running - - -![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 +Or on Windows, execute the following scripts in PowerShell ```powershell .\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. -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