k8s v1.5 web界面中kubernetes-dashboardv1.5的升级以及使用方法
k8s v1.5 web界面中kubernetes-dashboardv1.5的升级以及使用方法,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。
kubernetes dashboard镜像获取:
docker pull registry.cn-hangzhou.aliyuncs.com/google-containers/kubernetes-dashboard-amd64:v1.5.0 #这里重新tag,并push到自己的镜像仓库了docker tag e5133bac8024 www.perofu.com:7070/kubernetes-dashboard-amd64:v1.5.0 docker push www.perofu.com:7070/kubernetes-dashboard-amd64:v1.5.0 |
kubernetes-dashboard相关资源的配置文件:
[root@www: kube-dashboard]#curl -O kubernetes-dashboard_1.5.0.yaml https://rawgit.com/kubernetes/dashboard/master/class="lazy" data-src/deploy/kubernetes-dashboard.yaml [1446][root@www: kube-dashboard]#cat kubernetes-dashboard_1.5.0.yaml kind: Deployment apiVersion: extensions/v1beta1 metadata: labels: app: kubernetes-dashboard name: kubernetes-dashboard namespace: kube-system spec: replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: kubernetes-dashboard template: metadata: labels: app: kubernetes-dashboard # Comment the following annotation if Dashboard must not be deployed on master annotations: scheduler.alpha.kubernetes.io/tolerations: | [ { "key": "dedicated", "operator": "Equal", "value": "master", "effect": "NoSchedule" } ] spec: containers: - name: kubernetes-dashboard #image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.0 image: www.perofu.com:7070/kubernetes-dashboard-amd64:v1.5.0 imagePullPolicy: Always ports: - containerPort: 9090 protocol: TCP args: livenessProbe: httpGet: path: / port: 9090 initialDelaySeconds: 30 timeoutSeconds: 30 --- kind: Service apiVersion: v1 metadata: labels: app: kubernetes-dashboard name: kubernetes-dashboard namespace: kube-system spec: type: NodePort ports: - port: 80 targetPort: 9090 selector: app: kubernetes-dashboard |
创建kubernetes-dashboard相关资源:
[1396][root@www: kube-dashboard]# kubectl create -f kubernetes-dashboard_1.5.0.yaml deployment "kubernetes-dashboard" created service "kubernetes-dashboard" created [1397][root@www: kube-dashboard]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system kubernetes-dashboard-728075524-s6gd0 0/1 Pending 0 2s [1398][root@www: kube-dashboard]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system kubernetes-dashboard-728075524-s6gd0 1/1 Running 0 18s |
访问kubernetes dashboard界面:
http://192.168.16.234:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/
kubernetes dashboard V1.5,相对改变了很多,
①、左侧的任务栏,多了k8s的资源对象
②、dashboard 部署应用的没有改变
附上几张图片,剩下的,大家可以去探索一下!!!
看完上述内容,你们掌握k8s v1.5 web界面中kubernetes-dashboardv1.5的升级以及使用方法的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注编程网行业资讯频道,感谢各位的阅读!
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341