From 6e9b8319e9b6afd3d4a40523eb54317132214991 Mon Sep 17 00:00:00 2001 From: Li Yi Date: Wed, 1 May 2019 23:52:21 +0800 Subject: [PATCH] Support Docker Desktop v2.0.4.0 --- README.md | 62 ++++++----------------------------------------- README_en.md | 3 ++- images.properties | 12 ++++----- 3 files changed, 15 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index cc92760..fe9cfc0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ 说明: * 需安装 Docker for Mac或者Docker for Windows,如果没有请下载[下载 Docker CE最新版本](https://store.docker.com/search?type=edition&offering=community) -* 当前 master 分支已经在 Docker for Mac/Windows 2.0.1.x (包含 Docker CE 18.09.1 和 Kubernetes 1.13.0) 版本测试通过 +* 当前 master 分支已经在 Docker for Mac/Windows 2.0.4.x (包含 Docker CE 19.03.0 和 Kubernetes 1.14.1) 版本测试通过 + * 如果你希望使用 Docker for Mac/Windows 2.0.1.x/2.0.2.x/2.0.3.x (包含 Docker CE 18.09.1 和 Kubernetes 1.13.0) , 请使用下面命令切换 [v2.0.1.0 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v2.0.1.0) ```git checkout v2.0.1.0``` * 如果你希望使用 Docker for Mac/Windows 2.0.0.2/2.0.0.3 (包含 Docker CE 18.09.1 和 Kubernetes 1.10.11) , 请使用下面命令切换 [v2.0.0.2 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v2.0.0.2) ```git checkout v2.0.0.2``` * 如果你希望使用 18.09/18.06 版本(包含 Kubernetes 1.10.3) , 请使用下面命令切换 [18.09 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/18.09) ```git checkout 18.09``` * 如果你希望使用 18.03 版本, 请使用下面命令切换 [18.03 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/18.03) ```git checkout 18.03``` @@ -63,20 +64,11 @@ ![k8s](images/k8s_win.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" -``` - - ### 配置 Kubernetes -可选操作: 切换Kubernetes运行上下文至 docker-for-desktop (docker-ce 18.09 下 context 为 docker-desktop) +可选操作: 切换Kubernetes运行上下文至 docker-for-desktop ```shell @@ -201,61 +193,28 @@ kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mas #### 在 Mac OS 上安装 -##### 通过 brew 安装 - -brew 安装的版本可能会和 helm server 不兼容, 如果在后续使用 helm 安装组件的过程中出现以下错误,可以 `通过二进制包安装` 对应的版本 - -``` -$ helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system -Error: incompatible versions client[v2.13.1] server[v2.12.2] -``` - ```shell # Use homebrew on Mac brew install kubernetes-helm -# Change helm repo -helm repo add stable http://mirror.azure.cn/kubernetes/charts-incubator/ - # Install Tiller into your Kubernetes cluster helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.12.2 --skip-refresh -# Update charts repo (Optional) +# update charts repo (Optional) helm repo update ``` -##### 通过二进制包安装 - -``` -# Download binary release -在 https://github.com/helm/helm/releases 中找到匹配的版本并下载(需要梯子), 如: https://storage.googleapis.com/kubernetes-helm/helm-v2.12.2-darwin-amd64.tar.gz - -# Unpack - -tar -zxvf helm-v2.0.0-linux-amd64.tgz - -# Move it to its desired destination - -mv darwin-amd64/helm /usr/local/bin/helm - -``` - #### 在Windows上安装 -如果在后续使用 helm 安装组件的过程中出现版本兼容问题,可以参考 `通过二进制包安装` 思路安装匹配的版本 - ```shell # Use Chocolatey on Windows # 注:安装的时候需要保证网络能够访问googleapis这个域名 choco install kubernetes-helm -# Change helm repo -helm repo add stable http://mirror.azure.cn/kubernetes/charts-incubator/ - # Install Tiller into your Kubernetes cluster helm init --upgrade -i registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.12.2 --skip-refresh -# Update charts repo (Optional) +# update charts repo (Optional) helm repo update ``` @@ -266,11 +225,11 @@ helm repo update 可以根据文档安装 Istio https://istio.io/docs/setup/kubernetes/ -#### 下载 Istio 1.1.1 并安装 CLI +#### 下载 Istio 1.0.4 并安装 CLI ```bash curl -L https://git.io/getLatestIstio | sh - -cd istio-1.1.1/ +cd istio-1.0.4/ export PATH=$PWD/bin:$PATH ``` @@ -285,13 +244,6 @@ export PATH=$PWD/bin:$PATH #### 通过 Helm chart 安装 Istio ```shell -# 安装 istio-init chart 安装所有的 Istio CRD -helm install install/kubernetes/helm/istio-init --name istio-init --namespace istio-system - -# 验证下安装的 Istio CRD 个数 -kubectl get crds | grep 'istio.io\|certmanager.k8s.io' | wc -l - -# 开始 istio chart 安装 helm install install/kubernetes/helm/istio --name istio --namespace istio-system ``` diff --git a/README_en.md b/README_en.md index 73cb88b..12eb240 100644 --- a/README_en.md +++ b/README_en.md @@ -4,7 +4,8 @@ NOTE: -* The master branch is tested with Docker for Mac/Windows version 2.0.1.x (with Docker 18.09.1 and Kubernetes 1.13.0). +* The master branch is tested with Docker for Mac/Windows version 2.0.4.x (with Docker 19.03.0 and Kubernetes 1.14.1). + * If you want to use v2.0.1.0/v2.0.2.0/v2.0.3.0 (with Docker CE 18.09.1 and Kubernetes 1.13.0), please use the 18.09 branch ```git checkout v2.0.0.2``` * If you want to use v2.0.0.2/v2.0.0.3 (with Docker CE 18.09.1 and Kubernetes 1.10.11), please use the 18.09 branch ```git checkout v2.0.0.2``` * If you want to use Docker CE 18.09/18.06 (with Kubernetes 1.10.3), please use the 18.09 branch ```git checkout 18.09``` * If you want to use Docker CE 18.03, please use the 18.03 branch ```git checkout 18.03``` diff --git a/images.properties b/images.properties index 07b7af6..ff970ce 100644 --- a/images.properties +++ b/images.properties @@ -1,10 +1,10 @@ k8s.gcr.io/pause:3.1=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.1 -k8s.gcr.io/kube-controller-manager:v1.13.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.13.0 -k8s.gcr.io/kube-scheduler:v1.13.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.13.0 -k8s.gcr.io/kube-proxy:v1.13.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.13.0 -k8s.gcr.io/kube-apiserver:v1.13.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.13.0 -k8s.gcr.io/etcd:3.2.24=registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.2.24 -k8s.gcr.io/coredns:1.2.6=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.2.6 +k8s.gcr.io/kube-controller-manager:v1.14.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.14.1 +k8s.gcr.io/kube-scheduler:v1.14.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.14.1 +k8s.gcr.io/kube-proxy:v1.14.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.14.1 +k8s.gcr.io/kube-apiserver:v1.14.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.14.1 +k8s.gcr.io/etcd:3.3.10=registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.3.10 +k8s.gcr.io/coredns:1.3.1=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.3.1 k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-amd64:v1.10.1 quay.io/coreos/hyperkube:v1.7.6_coreos.0=registry.cn-hangzhou.aliyuncs.com/coreos_containers/hyperkube:v1.7.6_coreos.0 quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.21.0=registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.21.0 \ No newline at end of file