1、k8s的dashboard的安装部署,首先需要将压缩包下载下来,然后进行解压缩操作。
1 [root@k8s-master ~]# cd k8s/2 [root@k8s-master k8s]# ls3 book-master.war deploy health pod rc skydns skydns.zip svc tomcat_demo tomcat_demo.zip4 [root@k8s-master k8s]# wget https://www.qstack.com.cn/dashboard.zip5 --2020-06-18 20:02:26-- https://www.qstack.com.cn/dashboard.zip6 Resolving www.qstack.com.cn (www.qstack.com.cn)... 123.125.46.149, 111.202.85.377 Connecting to www.qstack.com.cn (www.qstack.com.cn)|123.125.46.149|:443... connected.8 HTTP request sent, awaiting response... 200 OK9 Length: 1099 (1.1K) [application/zip] 10 Saving to: ‘dashboard.zip’ 11 12 100%[=======================================================================================================================================================================>] 1,099 --.-K/s in 0.05s 13 14 2020-06-18 20:02:26 (20.2 KB/s) - ‘dashboard.zip’ saved [1099/1099] 15 16 [root@k8s-master k8s]# unzip dashboard.zip 17 Archive: dashboard.zip 18 creating: dashboard/ 19 inflating: dashboard/dashboard-deploy.yaml 20 inflating: dashboard/dashboard-svc.yaml 21 [root@k8s-master k8s]#
查看配置文件dashboard-deploy.yaml,并对配置进行修改。
1 [root@k8s-master dashboard]# vim dashboard-deploy.yaml
首先,需要将kubernetes-dashboard-amd64下载下来,然后上传到私有仓库里面,方便使用。
1 [root@k8s-master ~]# docker pull registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.02 Trying to pull repository registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64 ... 3 sha256:7755c0e7cb7e2585d21712f90e3d86d71cbc6362ab8fe283dae84cedc9c13396: Pulling from registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd644 833563f653b3: Pull complete 5 Digest: sha256:7755c0e7cb7e2585d21712f90e3d86d71cbc6362ab8fe283dae84cedc9c133966 Status: Downloaded newer image for registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.07 [root@k8s-master ~]# docker images 8 REPOSITORY TAG IMAGE ID CREATED SIZE9 192.168.110.133:5000/tomcat latest 2eb5a120304e 8 days ago 647 MB 10 docker.io/tomcat latest 2eb5a120304e 8 days ago 647 MB 11 192.168.110.133:5000/mysql 5.7.30 9cfcce23593a 9 days ago 448 MB 12 docker.io/mysql 5.7.30 9cfcce23593a 9 days ago 448 MB 13 docker.io/busybox latest 1c35c4412082 2 weeks ago 1.22 MB 14 docker.io/registry latest 708bc6af7e5e 4 months ago 25.8 MB 15 192.168.110.133:5000/nginx 1.15 53f3fd8007f7 13 months ago 109 MB 16 docker.io/nginx 1.15 53f3fd8007f7 13 months ago 109 MB 17 registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64 v1.10.0 9e12bc435ba6 15 months ago 122 MB 18 192.168.110.133:5000/nginx 1.13 ae513a47849c 2 years ago 109 MB 19 docker.io/nginx 1.13 ae513a47849c 2 years ago 109 MB 20 registry.access.redhat.com/rhel7/pod-infrastructure latest 99965fb98423 2 years ago 209 MB 21 192.168.110.133:5000/pod-infrastructure latest 34d3450d733b 3 years ago 205 MB 22 [root@k8s-master ~]# docker tag registry.cn-qingdao.aliyuncs.com/wangxiaoke/kubernetes-dashboard-amd64:v1.10.0 192.168.110.133:5000/kubernetes-dashboard-amd64:v1.10.0 23 [root@k8s-master ~]# docker push 192.168.110.133:5000/kubernetes-dashboard-amd64:v1.10.0 24 The push refers to a repository [192.168.110.133:5000/kubernetes-dashboard-amd64] 25 5f222ffea122: Pushed 26 v1.10.0: digest: sha256:7755c0e7cb7e2585d21712f90e3d86d71cbc6362ab8fe283dae84cedc9c13396 size: 529 27 [root@k8s-master ~]#
dashboard-deploy.yaml,对配置进行修改,具体内容,如下所示。
1 apiVersion: extensions/v1beta12 kin