diff --git a/README.md b/README.md index 15b36c1..72d0157 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 说明: * 需安装 Docker Desktop 的 Mac 或者 Windows 版本,如果没有请下载[下载 Docker CE最新版本](https://store.docker.com/search?type=edition&offering=community) -* 当前 master 分支已经在 Docker for Mac/Windows 2.1.4.x (包含 Docker CE 19.03.3 和 Kubernetes 1.15.4) 版本测试通过 +* 当前 v1.14.7 分支已经在 Docker for Mac/Windows 2.1.0.x (包含 Docker CE 19.03.4 和 Kubernetes 1.14.7) 版本测试通过 * 如果你希望使用 Docker for Mac/Windows 2.1.3.x (包含 Docker CE 19.03.2 和 Kubernetes 1.14.6) , 请使用下面命令切换 [v1.14.6 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.14.6) ```git checkout v1.14.6``` * 如果你希望使用 Docker for Mac/Windows 2.1.1.x (包含 Docker CE 19.03.0 和 Kubernetes 1.14.3) , 请使用下面命令切换 [v1.14.3 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.14.3) ```git checkout v1.14.3``` * 如果你希望使用 Docker for Mac/Windows 2.0.4.x (包含 Docker CE 18.09.1 和 Kubernetes 1.14.1) , 请使用下面命令切换 [v1.14.1 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.14.1) ```git checkout v1.14.1``` @@ -136,6 +136,13 @@ TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print kubectl config set-credentials docker-for-desktop --token="${TOKEN}" ``` +docker-ce 18.09 及以上版本 + +```shell +TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}') +kubectl config set-credentials docker-desktop --token="${TOKEN}" +``` + 对于Windows环境 ```shell @@ -143,6 +150,14 @@ $TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:" kubectl config set-credentials docker-for-desktop --token="${TOKEN}" ``` +docker-ce 18.09 及以上版本 + +```shell +$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1] +kubectl config set-credentials docker-desktop --token="${TOKEN}" +``` + + #### 登录dashboard的时候选择 kubeconfig 文件 ![resource](images/k8s_credentials.png) diff --git a/README_en.md b/README_en.md index 6f24451..3822bab 100644 --- a/README_en.md +++ b/README_en.md @@ -4,7 +4,7 @@ NOTE: -* The master branch is tested with Docker Desktop for Mac/Windows version 2.1.4.x (with Docker CE 19.03.3 and Kubernetes 1.15.4). +* The v1.14.7 branch is tested with Docker Desktop for Mac/Windows version 2.1.0.x (with Docker CE 19.03.4 and Kubernetes 1.14.7). * If you want to use 2.1.3.x (with Docker CE 19.03.2 and Kubernetes 1.14.6), please use the v1.14.6 ```git checkout v1.14.6``` * If you want to use 2.1.1.x (with Docker CE 19.03.0 and Kubernetes 1.14.3), please use the v1.14.3 ```git checkout v1.14.3``` * If you want to use 2.0.4.x (with Docker CE 19.03.0 and Kubernetes 1.14.1), please use the v1.14.1 ```git checkout v1.14.1``` diff --git a/images.properties b/images.properties index 372922f..8c15d50 100644 --- a/images.properties +++ b/images.properties @@ -1,9 +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.15.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.15.4 -k8s.gcr.io/kube-scheduler:v1.15.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.15.4 -k8s.gcr.io/kube-proxy:v1.15.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.15.4 -k8s.gcr.io/kube-apiserver:v1.15.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.15.4 +k8s.gcr.io/kube-controller-manager:v1.14.7=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.14.7 +k8s.gcr.io/kube-scheduler:v1.14.7=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.14.7 +k8s.gcr.io/kube-proxy:v1.14.7=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.14.7 +k8s.gcr.io/kube-apiserver:v1.14.7=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.14.7 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.26.1=registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.26.1 diff --git a/kubernetes-dashboard.yaml b/kubernetes-dashboard.yaml index 7cc6f64..f9475d4 100644 --- a/kubernetes-dashboard.yaml +++ b/kubernetes-dashboard.yaml @@ -109,12 +109,14 @@ spec: spec: containers: - name: kubernetes-dashboard - image: registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-amd64:v1.10.1 + image: k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.1 ports: - containerPort: 8443 protocol: TCP args: - --auto-generate-certificates + # Uncomment the following line to manually specify token expired ttl + # - --token-ttl=43200 # Uncomment the following line to manually specify Kubernetes API server Host # If not specified, Dashboard will attempt to auto discover the API server and connect # to it. Uncomment only if the default does not work.