为什么80%的码农都做不了架构师?>>>   

关于如何搭建基于docker的Kubernetes环境,请看笔者另一片博客: https://my.oschina.net/u/3559870/blog/1031428

插件说明

完成使用Kubeadm搭建Kubernetes(docker)之后,Kubernetes实际已经搭建成功~但是频繁操作命令行界面是会崩溃的好吗!!所以在Kubernetes 1.2版本后新增了Kube Dashboard,我们就可以在浏览器愉快的通过点 点 点操作啦。 ##功能说明 ## create:上传json或者yaml的方式新建resource,同kubectl create -f delete:删除副本(Replication Controllers) modify:修改副本数(replicas) query:查询相关信息,同kubectl get 通过web-ui+上述功能,我们就能基本脱离命令行界面了!

安装步骤

此时已经完成kubernetes的搭建。 我们将dashboard以静态Pod的方式运行在Master Node上。

cd /etc/kubernetes/manifests

此目录是已有的静态Pod的yaml文件,我们创建kubernetes-dashboard.yaml文件

# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.# Configuration to deploy release version of the Dashboard UI compatible with
# Kubernetes 1.6 (RBAC enabled).
#
# Example usage: kubectl create -f <this_file>apiVersion: v1
kind: ServiceAccount
metadata:labels:app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:name: kubernetes-dashboardlabels:app: kubernetes-dashboard
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: cluster-admin
subjects:
- kind: ServiceAccountname: kubernetes-dashboardnamespace: kube-system
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:labels:app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system
spec:replicas: 1revisionHistoryLimit: 10selector:matchLabels:app: kubernetes-dashboardtemplate:metadata:labels:app: kubernetes-dashboardspec:containers:- name: kubernetes-dashboardimage: registry.cn-beijing.aliyuncs.com/bbt_k8s/kubernetes-dashboard-amd64:v1.6.0imagePullPolicy: Alwaysports:- containerPort: 9090protocol: TCPargs:# Uncomment the following line to manually specify Kubernetes API server Host# If not specified, Dashboard will attempt to auto discover the API server and connect# to it. Uncomment only if the default does not work.# - --apiserver-host=http://my-address:portlivenessProbe:httpGet:path: /port: 9090initialDelaySeconds: 30timeoutSeconds: 30serviceAccountName: kubernetes-dashboard# Comment the following tolerations if Dashboard must not be deployed on mastertolerations:- key: node-role.kubernetes.io/mastereffect: NoSchedule
---
kind: Service
apiVersion: v1
metadata:labels:app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system
spec:type: NodePortports:- port: 80targetPort: 9090selector:app: kubernetes-dashboard

创建文件kubernetes-dashboard-rbac.yaml文件

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:name: dashboard-admin
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: cluster-admin
subjects:
- kind: ServiceAccountname: defaultnamespace: kube-system

创建dashboard、dashboard-rbac resource

kubectl create -f kubernetes-dashboard-rbac.yml
kubectl create -f kubernetes-dashboard.yaml

创建成功结果如下所示

[root@kube-master manifests]# kubectl create -f dashboard-rbac.yaml
clusterrolebinding "dashboard-admin" created
[root@kube-master manifests]# kubectl create -f dashboard.yaml
serviceaccount "kubernetes-dashboard" created
clusterrolebinding "kubernetes-dashboard" created
deployment "kubernetes-dashboard" created
service "kubernetes-dashboard" created

查询dashboard运行的端口

kubectl describe --namespace kube-system service kubernetes-dashboard
[root@kube-master manifests]# kubectl describe --namespace kube-system service kubernetes-dashboard
Name:           kubernetes-dashboard
Namespace:      kube-system
Labels:         app=kubernetes-dashboard
Annotations:        <none>
Selector:       app=kubernetes-dashboard
Type:           NodePort
IP:         10.110.236.54
Port:           <unset>   80/TCP
NodePort:       <unset>   30989/TCP
Endpoints:      10.244.0.16:9090
Session Affinity:   None
Events:         <none>

NodePort就是我们要访问的端口啦!快快打开浏览器输入{master-ip}:{node-port}吧!

转载于:https://my.oschina.net/zili/blog/1031430

安装Kubernetes-Dashboard插件相关推荐

  1. 轻松快速安装Kubernetes dashboard

    安装前需要准备工作: 1.虚拟机工具VirtualBox 2.系统镜像文件CentOS 7 3.安装好虚拟机2-3台 本次教程使用的是三台虚拟机: 192.168.4.13 k8s-master 19 ...

  2. minikube 安装 Kubernetes Dashboard 并集成 Heapster

    目录 Kubernetes Dashboard 介绍 环境.软件准备 Kubernetes Dashboard 安装 Heapster 插件安装 简单演示使用 Dashboard 1.Kubernet ...

  3. kubernetes1.8.4 安装指南 -- 11. 安装kubernetes dashboard

    接下来安装WebUI Dashboard dashboard的版本兼容性 所以接下来安装的是1.8.0版本. 参照文档https://github.com/kubernetes/dashboard/w ...

  4. Centos7 安装 Kubernetes dashboard (安装篇)

    ----安装dashboard---- http://docs.minunix.com/docker/kubernetes-dashboard.yaml 下载 http://www.jb51.net/ ...

  5. 安装kubernetes dashboard时开发环境,运行gulp local-up-cluster任务一直显示wating for a heapster

    问题 按照官方教程搭建dashboard的开发环境,运行"gulp local-up-cluster"任务,一直不断显示"waiting for a heapster-& ...

  6. 有史以来最详细 安装部署Kubernetes Dashboard (补充解决官方出现的一些RBAC CERT等问题)

    安装部署Kubernetes Dashboard (补充解决官方出现的一些RBAC CERT等问题) 官方文档:https://github.com/kubernetes/dashboard 参考文章 ...

  7. kubernetes dashboard 安装

    环境: CentOS Linux release 7.3.1611 (Core) IP:192.168.0.103 [1]组件安装 yum install device-mapper yum inst ...

  8. Kubernetes Dashboard使用socks5代理安装

    问题 在使用Kubernetes Dashboard过程中发现,需要运行如下命令: kubectl apply -f https://raw.githubusercontent.com/kuberne ...

  9. [原]部署kubernetes dashboard(二)

    #######################    以下为声明  ##################### 此文档是之前做笔记在两台机上进行的实践,kubernetes处于不断开发阶段 不能保证每 ...

  10. Heapster -- Kubernetes Dashboard集成Heapster

    原始kubernetes dashboard的界面中仅显示了pod一些配置信息,无法图形化展现集群度量指标信息.原始图如下(此处从网上找了一个图..): 而如果要展示图形化的集群度量指标信息,就需要安 ...

最新文章

  1. 【Anaconda】安装源---豆瓣,清华
  2. Unity整合TortoiseSVN
  3. JavaOne 2014:会议与合同利益冲突
  4. Flutter 权限申请
  5. java栈的内存_JVM的栈内存
  6. 猫哥教你写爬虫 004--数据类型转换-小练习
  7. mysql查询,left join(求并集),where(求交集)
  8. 【C#】Skip和Tack方法实现分页
  9. 换服务器原网站数据会丢失吗,ecs服务器更换操作系统后原服务器数据还在吗?...
  10. 【权值分块】bzoj1588 [HNOI2002]营业额统计
  11. linux服务器校对时间方法
  12. 百战程序员python百度网盘_【百战程序员】Python 文件I/O
  13. WGS84经纬度坐标与北京54坐标或者西安80坐标的关系-3
  14. 【180620】小人物走路、奔跑的VC++游戏特效
  15. 酒浓码浓 - HTML5微数据/itemscope/itemtype/itemprop
  16. 阿里云和腾讯云服务器10M带宽能支持多少人在线?
  17. python汽车租赁程序_python数据分析实例:共享单车租用影响因素探索
  18. ff14最新服务器人数,FF14第一波转服过后 现各服务器人口状况
  19. RK3588S Android12 旋转系统图像
  20. java获得windows系统当前时间与时间不符合

热门文章

  1. 前端学PHP之面向对象系列第四篇——关键字
  2. Android使用Application总结
  3. ASP.NET站点性能提升-压缩
  4. C语言经典例66-输入3个数a,b,c,按大小顺序输出
  5. 【Git】Git 分支管理 ( 解决分支合并冲突 | 本地处理文件冲突 )
  6. 【计算机网络】网络层 : IP 组播 ( IP 数据报传输方式 | 组播 IP 地址 | 组播 MAC 地址 | IGMP 协议 | 组播路由选择协议 )
  7. 【组合数学】指数型母函数 应用 ( 多重集排列问题 | 不同球放在不同盒子里 | 奇/偶数序列的指数生成函数推导 )
  8. 【微信开发】微信公众号开发 之 编辑模式使用
  9. 设计模式-Builder模式
  10. luogu P1393 P3157 动态逆序对