Skip to content

Commit

Permalink
add suport v1.22.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mzmuer committed Dec 7, 2021
1 parent 6956a81 commit dcdd6e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
说明:

* 需安装 Docker Desktop 的 Mac 或者 Windows 版本,如果没有请下载[下载 Docker CE最新版本](https://store.docker.com/search?type=edition&offering=community)
* 当前 master 分支已经在 Docker for Mac/Windows 4.1.0 (包含 Docker CE 20.10.8 和 Kubernetes 1.21.5) 版本测试通过
* 当前 master 分支已经在 Docker for Mac/Windows 4.3.0 (包含 Docker CE 20.10.11 和 Kubernetes 1.22.4) 版本测试通过
* 如果需要测试其他版本,请查看 Docker Desktop版本,Docker -> About Docker Desktop
![about](images/about.png)
* 如Kubernetes版本为 v1.22.4, 请使用下面命令切换 [v1.22.4 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.22.4) ```git checkout v1.22.4```
* 如Kubernetes版本为 v1.21.5, 请使用下面命令切换 [v1.21.5 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.21.5) ```git checkout v1.21.5```
* 如Kubernetes版本为 v1.21.4, 请使用下面命令切换 [v1.21.4 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.21.4) ```git checkout v1.21.4```
* 如Kubernetes版本为 v1.21.3, 请使用下面命令切换 [v1.21.3 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.21.3) ```git checkout v1.21.3```
Expand Down Expand Up @@ -114,7 +115,7 @@ kubectl get nodes
#### 部署 Kubernetes dashboard

```shell
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.4/aio/deploy/recommended.yaml
```

Expand Down Expand Up @@ -145,15 +146,15 @@ http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kube

```shell
TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}')
kubectl config set-credentials docker-desktop --token="${TOKEN}"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
echo $TOKEN
```

对于Windows环境

```shell
$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]
kubectl config set-credentials docker-desktop --token="${TOKEN}"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
echo $TOKEN
```
Expand Down Expand Up @@ -187,7 +188,7 @@ Win: %UserProfile%\.kube\config
安装
```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/cloud/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-0.32.0/deploy/static/provider/cloud/deploy.yaml
```
验证
Expand Down
9 changes: 5 additions & 4 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

NOTE:

* The master branch is tested with Docker Desktop for Mac/Windows version 4.1.0 (with Docker CE 20.10.8 and Kubernetes 1.21.5).
* The master branch is tested with Docker Desktop for Mac/Windows version 4.3.0 (with Docker CE 20.10.11 and Kubernetes 1.22.4).
* If you want to use with other version, pls check version of Kubernetes,Docker -> About Docker Desktop
![about](images/about.png)
* For Kubernetes v1.22.4, please use the v1.22.4 branch ```git checkout v1.22.4```
* For Kubernetes v1.21.4, please use the v1.21.1 branch ```git checkout v1.21.5```
* For Kubernetes v1.21.4, please use the v1.21.1 branch ```git checkout v1.21.4```
* For Kubernetes v1.21.3, please use the v1.21.1 branch ```git checkout v1.21.3```
Expand Down Expand Up @@ -109,7 +110,7 @@ kubectl get nodes
#### Install Kubernetes dashboard

```shell
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.4/aio/deploy/recommended.yaml
```

or
Expand Down Expand Up @@ -140,15 +141,15 @@ For Mac

```bash
TOKEN=$(kubectl -n kube-system describe secret default| awk '$1=="token:"{print $2}')
kubectl config set-credentials docker-desktop --token="${TOKEN}"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
echo $TOKEN
```

For Windows

```cmd
$TOKEN=((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]
kubectl config set-credentials docker-desktop --token="${TOKEN}"
kubectl config set-credentials docker-for-desktop --token="${TOKEN}"
echo $TOKEN
```

Expand Down
14 changes: 7 additions & 7 deletions images.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
k8s.gcr.io/pause:3.4.1=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.4.1
k8s.gcr.io/kube-controller-manager:v1.21.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.21.5
k8s.gcr.io/kube-scheduler:v1.21.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.21.5
k8s.gcr.io/kube-proxy:v1.21.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.21.5
k8s.gcr.io/kube-apiserver:v1.21.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.21.5
k8s.gcr.io/etcd:3.4.13-0=registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.13-0
k8s.gcr.io/coredns/coredns:v1.8.0=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.8.0
k8s.gcr.io/pause:3.5=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.5
k8s.gcr.io/kube-controller-manager:v1.22.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.22.4
k8s.gcr.io/kube-scheduler:v1.22.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.22.4
k8s.gcr.io/kube-proxy:v1.22.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.22.4
k8s.gcr.io/kube-apiserver:v1.22.4=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.22.4
k8s.gcr.io/etcd:3.5.0-0=registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.0-0
k8s.gcr.io/coredns/coredns:v1.8.4=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.8.4
quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.26.1=registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:0.26.1

0 comments on commit dcdd6e3

Please sign in to comment.