Skip to content

Commit

Permalink
Update to Kubernetes v1.24.0 and kubernetes-dashboard v2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzm committed May 9, 2022
1 parent 7c6907b commit c7c379b
Show file tree
Hide file tree
Showing 6 changed files with 748 additions and 17 deletions.
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
说明:

* 需安装 Docker Desktop 的 Mac 或者 Windows 版本,如果没有请下载[下载 Docker CE最新版本](https://store.docker.com/search?type=edition&offering=community)
* 当前 master 分支已经在 Docker for Mac/Windows 4.4.2 (包含 Docker CE 20.10.12 和 Kubernetes 1.22.5) 版本测试通过
* 当前 master 分支已经在 Docker for Mac/Windows 4.8.0 (包含 Docker CE 20.10.14 和 Kubernetes 1.24.0) 版本测试通过
* 如果需要测试其他版本,请查看 Docker Desktop版本,Docker -> About Docker Desktop
![about](images/about.png)
* 如Kubernetes版本为 v1.24.0, 请使用下面命令切换 [v1.24.0 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.24.0) ```git checkout v1.24.0```
* 如Kubernetes版本为 v1.23.4, 请使用下面命令切换 [v1.23.4 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.23.4) ```git checkout v1.23.4```
* 如Kubernetes版本为 v1.22.5, 请使用下面命令切换 [v1.22.5 分支](https://github.com/AliyunContainerService/k8s-for-docker-desktop/tree/v1.22.5) ```git checkout v1.22.5```
* 如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```
Expand Down Expand Up @@ -116,13 +118,13 @@ 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.5.1/aio/deploy/recommended.yaml
```


```shell
kubectl create -f kubernetes-dashboard.yaml
kubectl apply -f kubernetes-dashboard.yaml
```

检查 kubernetes-dashboard 应用状态
Expand All @@ -143,6 +145,12 @@ http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kube

#### 配置控制台访问令牌

授权`kube-system`默认服务账号

```shell
kubectl apply -f kube-system-default.yaml
```

对于Mac环境

```shell
Expand Down Expand Up @@ -189,7 +197,13 @@ Win: %UserProfile%\.kube\config
安装
```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
```
```shell
kubectl apply -f ingress-nginx-controller.yaml
```
验证
Expand Down Expand Up @@ -230,7 +244,7 @@ kubectl delete -f sample/ingress.yaml
#### 删除 Ingress
```shell
kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml
kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
```
### 安装 Helm
Expand Down
76 changes: 73 additions & 3 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

NOTE:

* 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).
* The master branch is tested with Docker Desktop for Mac/Windows version 4.8.0 (with Docker CE 20.10.14 and Kubernetes 1.24.0).
* If you want to use with other version, pls check version of Kubernetes,Docker -> About Docker Desktop
![about](images/about.png)
* For Kubernetes v1.24.0, please use the v1.24.0 branch ```git checkout v1.24.0```
* For Kubernetes v1.23.4, please use the v1.23.4 branch ```git checkout v1.23.4```
* For Kubernetes v1.22.5, please use the v1.22.5 branch ```git checkout v1.22.5```
* 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```
Expand Down Expand Up @@ -111,13 +113,13 @@ 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.5.1/aio/deploy/recommended.yaml
```

or

```shell
kubectl create -f kubernetes-dashboard.yaml
kubectl apply -f kubernetes-dashboard.yaml
```

Check Kubernetes Dashboard status
Expand All @@ -138,6 +140,12 @@ http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kube

#### Config Token for dashboard

Authorize `kube-system` default service account

```shell
kubectl apply -f kube-system-default.yaml
```

For Mac

```bash
Expand Down Expand Up @@ -169,6 +177,68 @@ Mac: $HOME/.kube/config

Click login, go to Kubernetes Dashboard

### Config Ingress

Note: If you are testing Istio, donot need to install Ingress

#### Install Ingress

[Installation Notes](https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md)
```
- If the installation script cannot be installed, you can jump to this address to view the latest operations
```

Install
```shell
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
```
Or

```shell
kubectl apply -f ingress-nginx-controller.yaml
```

Check

```shell
kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx
```

#### Test the sample app


Deploy the test application, see [Community Article](https://matthewpalmer.net/kubernetes-app-developer/articles/kubernetes-ingress-guide-nginx-example.html) for details


```shell
kubectl create -f sample/apple.yaml
kubectl create -f sample/banana.yaml
kubectl create -f sample/ingress.yaml
```

Test the sample app

```bash
$ curl -kL http://localhost/apple
apple
$ curl -kL http://localhost/banana
banana
```

Remove the sample app

```shell
kubectl delete -f sample/apple.yaml
kubectl delete -f sample/banana.yaml
kubectl delete -f sample/ingress.yaml
```

#### Delete Ingress

```shell
kubectl delete -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.2.0/deploy/static/provider/cloud/deploy.yaml
```

### Install Helm

Install helm following the instruction on https://helm.sh/docs/intro/install/
Expand Down
16 changes: 8 additions & 8 deletions images.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
k8s.gcr.io/pause:3.5=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.5
k8s.gcr.io/kube-controller-manager:v1.22.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.22.5
k8s.gcr.io/kube-scheduler:v1.22.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.22.5
k8s.gcr.io/kube-proxy:v1.22.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.22.5
k8s.gcr.io/kube-apiserver:v1.22.5=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.22.5
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
k8s.gcr.io/ingress-nginx/controller:v1.1.1=registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:v1.1.1
k8s.gcr.io/pause:3.7=registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.7
k8s.gcr.io/kube-controller-manager:v1.24.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.24.0
k8s.gcr.io/kube-scheduler:v1.24.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.24.0
k8s.gcr.io/kube-proxy:v1.24.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.24.0
k8s.gcr.io/kube-apiserver:v1.24.0=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.24.0
k8s.gcr.io/etcd:3.5.3-0=registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.5.3-0
k8s.gcr.io/coredns/coredns:v1.8.6=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.8.6
k8s.gcr.io/ingress-nginx/controller:v1.2.0=registry.cn-hangzhou.aliyuncs.com/google_containers/nginx-ingress-controller:v1.2.0
k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1=registry.cn-hangzhou.aliyuncs.com/google_containers/kube-webhook-certgen:v1.1.1
Loading

0 comments on commit c7c379b

Please sign in to comment.