接下来安装WebUI Dashboard

dashboard的版本兼容性

所以接下来安装的是1.8.0版本。

参照文档https://github.com/kubernetes/dashboard/wiki/Certificate-management, 需要建立secret

mkdir -p /etc/kubernetes/addons/certs && cd /etc/kubernetes/addons

openssl genrsa -des3 -passout pass:x -out certs/dashboard.pass.key 2048

openssl rsa -passin pass:x -in certs/dashboard.pass.key -out certs/dashboard.key

openssl req -new -key certs/dashboard.key -out certs/dashboard.csr -subj '/CN=kube-dashboard'

openssl x509 -req -sha256 -days 365 -in certs/dashboard.csr -signkey certs/dashboard.key -out certs/dashboard.crt

rm certs/dashboard.pass.key

kubectl create secret generic kubernetes-dashboard-certs --from-file=certs -n kube-system

接下来安装dashboard

kubernetes-dashboard-1.8.0.yaml

# Copyright 2017 The Kubernetes Authors.
#
# 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.8.
#
# Example usage: kubectl create -f <this_file># ------------------- Dashboard Secret ------------------- #apiVersion: v1
kind: Secret
metadata:labels:k8s-app: kubernetes-dashboardname: kubernetes-dashboard-certsnamespace: kube-system
type: Opaque---
# ------------------- Dashboard Service Account ------------------- #apiVersion: v1
kind: ServiceAccount
metadata:labels:k8s-app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system---
# ------------------- Dashboard Role & Role Binding ------------------- #kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:name: kubernetes-dashboard-minimalnamespace: kube-system
rules:# Allow Dashboard to create 'kubernetes-dashboard-key-holder' secret.
- apiGroups: [""]resources: ["secrets"]verbs: ["create"]# Allow Dashboard to get, update and delete Dashboard exclusive secrets.
- apiGroups: [""]resources: ["secrets"]resourceNames: ["kubernetes-dashboard-key-holder", "kubernetes-dashboard-certs"]verbs: ["get", "update", "delete"]# Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map.
- apiGroups: [""]resources: ["configmaps"]resourceNames: ["kubernetes-dashboard-settings"]verbs: ["get", "update"]# Allow Dashboard to get metrics from heapster.
- apiGroups: [""]resources: ["services"]resourceNames: ["heapster"]verbs: ["proxy"]---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:name: kubernetes-dashboard-minimalnamespace: kube-system
roleRef:apiGroup: rbac.authorization.k8s.iokind: Rolename: kubernetes-dashboard-minimal
subjects:
- kind: ServiceAccountname: kubernetes-dashboardnamespace: kube-system---
# ------------------- Dashboard Deployment ------------------- #kind: Deployment
apiVersion: apps/v1beta2
metadata:labels:k8s-app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system
spec:replicas: 1revisionHistoryLimit: 10selector:matchLabels:k8s-app: kubernetes-dashboardtemplate:metadata:labels:k8s-app: kubernetes-dashboardspec:containers:- name: kubernetes-dashboardimage: registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetes-dashboard-amd64:v1.8.0imagePullPolicy: IfNotPresentports:- containerPort: 8443protocol: TCPargs:- --tls-key-file=dashboard.key- --tls-cert-file=dashboard.crt#- --auto-generate-certificates# 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:portvolumeMounts:- name: kubernetes-dashboard-certsmountPath: /certs# Create on-disk volume to store exec logs- mountPath: /tmpname: tmp-volumelivenessProbe:httpGet:scheme: HTTPSpath: /port: 8443initialDelaySeconds: 30timeoutSeconds: 30volumes:- name: kubernetes-dashboard-certssecret:secretName: kubernetes-dashboard-certs- name: tmp-volumeemptyDir: {}serviceAccountName: kubernetes-dashboard# Comment the following tolerations if Dashboard must not be deployed on mastertolerations:- key: node-role.kubernetes.io/mastereffect: NoSchedule---
# ------------------- Dashboard Service ------------------- #kind: Service
apiVersion: v1
metadata:labels:k8s-app: kubernetes-dashboardname: kubernetes-dashboardnamespace: kube-system
spec:ports:- port: 443targetPort: 8443selector:k8s-app: kubernetes-dashboard

kubernetes-dashboard-admin.yaml

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

kubectl apply -f kubernetes-dashboard-1.8.0.yaml

kubectl apply -f kubernetes-dashboard-admin.yaml

访问dashboard

https://10.0.0.210:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/

备注说明:由于没有部署heapster, 所以度量数据无法正确显示,这是正常的。

kubernetes1.8.4 安装指南 -- 11. 安装kubernetes dashboard相关推荐

  1. kubernetes1.8.4 安装指南 -- 6. 安装kubernetes master

    接下来安装kubernetes master的3个核心组件,分别是apiserver, controller-manager, scheduler. mkdir -p /etc/kubernetes/ ...

  2. 轻松快速安装Kubernetes dashboard

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

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

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

  4. minikube 安装 Kubernetes Dashboard 并集成 Heapster

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

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

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

  6. kubernetes1.8.4 安装指南 -- 8. 安装Kube DNS

    在master节点的/etc/kubernetes/addons/下面建立文件kube-dns.yml apiVersion: v1 kind: ServiceAccount metadata:nam ...

  7. kubernetes1.8.4安装指南 -- 3. 安装docker ce

    由于采用的是基于静态pod的安装方式,所以需要在所有节点安装docker包括master节点. 安装docker-ce 17.09 yum install yum-utils device-mappe ...

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

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

  9. kubernetes dashboard 安装

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

最新文章

  1. bzoj1588[HNOI2002]营业额统计——双向链表
  2. python中元组tuple官方使用手册
  3. tcp wrapper
  4. springboot 打卡功能_实战:如果让你用SpringBoot实现签到奖励的功能,你会怎么做?...
  5. C++11标准出现后,函数指针写法汇总
  6. Oracle Stream配置详细步骤
  7. [delphi]极域学生端解除键盘鼠标锁定退出全屏广播-强制窗口化-源代码
  8. Servlet ---- cookie session
  9. 聚类分析一:K-MEANS算法
  10. 尚硅谷Javaweb教程书城项目订单模块完整版
  11. 以太网协议号字段定义
  12. 从零开始之驱动发开、linux驱动(二十、linux设备驱动中的并发控制)
  13. android ct扫描模拟,基于Android平台的CT图像可视化显示方法及实现
  14. C#中操作Word(7)—— 如何向Word中插入表格
  15. 赵小楼《天道》《遥远的救世主》深度解析(120)信息储备是必要的强势文化之一
  16. this.$router.push方法,父子如何传值和接收值
  17. SecureCRT上传文件到服务器 CentOS举例
  18. Liferay环境搭建、简单说明与相关资料
  19. HGST推氦气硬盘:用于液体冷却服务器
  20. Spring 3.x企业应用开发实战

热门文章

  1. Linux vi格式化文件命令
  2. POJ - 3342 Party at Hali-Bula(树形dp)
  3. CSTrackV2解读
  4. HDU4367(线段相交与斐波那契数列)
  5. 八进制小数转化为十进制小数
  6. 25.智能指针.rs
  7. PostgreSQL COPY 导入/导出数据
  8. 关于windows xp sp2/sp3 中tcpip.sys对于Raw socket的限制
  9. go-zero:微服务框架
  10. 秋天的第一份“干货” I Referer 防盗链,为什么少了个字母 R?