內(nèi)容要點:
我們注重客戶提出的每個要求,我們充分考慮每一個細節(jié),我們積極的做好成都做網(wǎng)站、成都網(wǎng)站制作服務(wù),我們努力開拓更好的視野,通過不懈的努力,成都創(chuàng)新互聯(lián)贏得了業(yè)內(nèi)的良好聲譽,這一切,也不斷的激勵著我們更好的服務(wù)客戶。 主要業(yè)務(wù):網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)站設(shè)計,小程序設(shè)計,網(wǎng)站開發(fā),技術(shù)開發(fā)實力,DIV+CSS,PHP及ASP,ASP.Net,SQL數(shù)據(jù)庫的技術(shù)開發(fā)工程師。
1、環(huán)境介紹
2、web界面部署
一、環(huán)境介紹:
1、此篇作為k8s群集部署的最后一步,前幾步博客地址:
kubernetes二進制集群部署一——etcd存儲組件、flannel網(wǎng)絡(luò)組件部署:
kubernetes二進制集群部署二——單master集群部署+多master群及部署:
kubernetes二進制集群部署三——負載均衡調(diào)度器部署:
2、dashborad 官方文件地址:https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard
二、web界面部署:
?在?master01上操作: //創(chuàng)建?dashborad(控制面板)工作目錄: [root@localhost?k8s]#?mkdir?dashboard //拷貝官方文件(總共6個): [root@localhost?dashboard]#?ls?? dashboard-configmap.yaml???dashboard-rbac.yaml????dashboard-service.yaml dashboard-controller.yaml??dashboard-secret.yaml??k8s-admin.yaml //加載、創(chuàng)建所有的文件: [root@localhost?dashboard]#?kubectl?create?-f?dashboard-rbac.yaml role.rbac.authorization.k8s.io/kubernetes-dashboard-minimal?created rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard-minimal?created [root@localhost?dashboard]#?kubectl?create?-f?dashboard-secret.yaml secret/kubernetes-dashboard-certs?created secret/kubernetes-dashboard-key-holder?created [root@localhost?dashboard]#?kubectl?create?-f?dashboard-configmap.yaml configmap/kubernetes-dashboard-settings?created [root@localhost?dashboard]#?kubectl?create?-f?dashboard-controller.yaml serviceaccount/kubernetes-dashboard?created deployment.apps/kubernetes-dashboard?created [root@localhost?dashboard]#?kubectl?create?-f?dashboard-service.yaml service/kubernetes-dashboard?created //完成創(chuàng)建后查看創(chuàng)建在指定的?kube-system命名空間下: [root@localhost?dashboard]#?kubectl?get?pods?-n?kube-system NAME????????????????????????????????????READY???STATUS????RESTARTS???AGE kubernetes-dashboard-65f974f565-rs2h5???1/1?????Running???0??????????4m23s //查看如何訪問: [root@localhost?dashboard]#?kubectl?get?pods,svc?-n?kube-system NAME????????????????????????????????????????READY???STATUS????RESTARTS???AGE pod/kubernetes-dashboard-65f974f565-x9vrg???1/1?????Running???0??????????8m32s NAME???????????????????????????TYPE???????CLUSTER-IP???EXTERNAL-IP???PORT(S)?????????AGE service/kubernetes-dashboard???NodePort???10.0.0.110???????????443:30001/TCP???8m18s
此時,我們用谷歌瀏覽器訪問:https://192.168.109.131:30001/
原因:沒有自簽證書
如何解決:寫一個證書
在?master01上: [root@localhost?dashboard]#?vim?dashboard-cert.sh cat?>?dashboard-csr.json?< //接下來,進行重新部署: [root@localhost?dashboard]#??kubectl?apply?-f?dashboard-controller.yaml? Warning:?kubectl?apply?should?be?used?on?resource?created?by?either?kubectl?create?--save-config?or?kubectl?apply serviceaccount/kubernetes-dashboard?configured Warning:?kubectl?apply?should?be?used?on?resource?created?by?either?kubectl?create?--save-config?or?kubectl?apply deployment.apps/kubernetes-dashboard?configured然后,我們再次訪問剛剛的那個網(wǎng)站:https://192.168.220.136:30001/
選擇接受風(fēng)險并繼續(xù),選擇令牌:
接下來,我們要做的就是生成令牌,在瀏覽器中填入即可:
//生成令牌: [root@localhost?dashboard]#?kubectl?create?-f?k8s-admin.yaml //保存: [root@localhost?dashboard]#?kubectl?get?secret?-n?kube-system NAME???????????????????????????????TYPE??????????????????????????????????DATA???AGE dashboard-admin-token-829rp????????kubernetes.io/service-account-token???3??????9s default-token-rsrxp????????????????kubernetes.io/service-account-token???3??????3h20m kubernetes-dashboard-certs?????????Opaque????????????????????????????????11?????12m kubernetes-dashboard-key-holder????Opaque????????????????????????????????2??????119m kubernetes-dashboard-token-6rdlf???kubernetes.io/service-account-token???3??????118m //查看令牌: [root@localhost?dashboard]#?kubectl?describe?secret?dashboard-admin-token-829rp?-n?kube-system而下面,就是生成令牌的一段密文:
我們把這段密文復(fù)制,然后粘貼到,瀏覽器上面的空白處即可:
然后,我們可以在控制面板上,管理我們的各個組件,查看各類信息和概況等等,非常的方便
分享名稱:kubernetes二進制集群部署四——部署web界面
網(wǎng)站鏈接:http://weahome.cn/article/jhiesh.html