1、安装dashboard

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
(images地址记得改掉,因为墙,你懂得)

1.2, 配置ingress 映像域名xxx.dashboard.qing.cn(必须是https)

2 、创建admin token

#cat dashboard-adminuser.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system ---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kube-system #kubectl apply -f dashboard-adminuser.yaml
#kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')

复制 token登陆即可

3、增加只读帐号token

#cat read-user-sa-rbac.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
name: dashboard-read-user
namespace: kube-system

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: dashboard-read-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: dashboard-read-clusterrole
subjects:
- kind: ServiceAccount
name: dashboard-read-user
namespace: kube-system

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: dashboard-read-clusterrole
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- persistentvolumeclaims
- pods
- replicationcontrollers
- replicationcontrollers/scale
- serviceaccounts
- services
- nodes
- persistentvolumeclaims
- persistentvolumes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- bindings
- events
- limitranges
- namespaces/status
- pods/log
- pods/status
- replicationcontrollers/status
- resourcequotas
- resourcequotas/status
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- deployments/scale
- replicasets
- replicasets/scale
- statefulsets
verbs:
- get
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- daemonsets
- deployments
- deployments/scale
- ingresses
- networkpolicies
- replicasets
- replicasets/scale
- replicationcontrollers/scale
verbs:
- get
- list
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- networkpolicies
verbs:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
- volumeattachments
verbs:
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
- roles
- rolebindings
verbs:
- get
- list
- watch

 

Kubernetes Dashboard 安装与认证的更多相关文章

  1. kubernetes dashboard 安装

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

  2. kubernetes dashboard 安装时出现9090: getsockopt: connection refused错误

    转载于:https://blog.csdn.net/lucy06/article/details/79082302 安装kubernetes  dashboard时,出现错误: Error: 'dia ...

  3. Kubernetes dashboard安装

    1. To download Dashboard plugin deployment YAML file from internet. #cd /home #mkdir k8s #cd k8s # w ...

  4. install kubernetes dashboard 安装 kubernetes dashboard 详细

    参考: http://www.bubuko.com/infodetail-2242562.html http://www.cnblogs.com/zhenyuyaodidiao/p/6500897.h ...

  5. Kubernetes入门(二)——Dashboard 安装

    Kubernetes集群搭建完成后,可以通过命令行方式可以了解集群资源的使用情况,但是这种方式比较笨拙且不直观,因此考虑给集群安装Dashboard,这样能更直观了解集群状态.本文Dashboard的 ...

  6. Kubernetes 及安装注意事项

    Docker Desktop for Mac/Windows开启Kubernetes 及安装注意事项 Table of Contents 1 解决方案 2 注意事项 2.1 Choose Kubeco ...

  7. K8s+dashboard安装部署【h】

    系统安装使用虚拟机安装两个centos系统,在/etc/hosts里增加两行192.168.140.128 kuber-master192.168.140.129 kuber-node1 关闭防火墙s ...

  8. kubernetes学习笔记之十一:kubernetes dashboard认证及分级授权

    第一章.部署dashboard 作为Kubernetes的Web用户界面,用户可以通过Dashboard在Kubernetes集群中部署容器化的应用,对应用进行问题处理和管理,并对集群本身进行管理.通 ...

  9. kubernetes Dashboard 使用RBAC 权限认证控制

    kubernetes RBAC实战 环境准备 先用kubeadm安装好kubernetes集群,[包地址在此](https://market.aliyun.com/products/56014009/ ...

随机推荐

  1. vue.js过度&动画、混入&插件

    1.vue  过度动画 1.过度 Vue 在插入.更新或者移除 DOM 时,提供多种不同方式的应用过渡效果.Vue 提供了内置的过渡封装组件,该组件用于包裹要实现过渡效果的组件. 语法格式: < ...

  2. WPF 通过Win32SDK修改窗口样式

    使用函数为 SetWindowLong GetWindowLong 注册函数 [DllImport("user32.dll", EntryPoint = "GetWind ...

  3. Zabbix触发器和监控项设置时间范围

    目录 一.实际业务场景 业务问题 解决办法 二.Zabbix触发器和监控项与用户预警设置时间范围配置流程 一.触发器设置时间范围 二.监控项设置时间范围 三.用户报警设置启用时间 一.实际业务场景 业 ...

  4. 使用T4模板同时生成多个类文件

    代码: <#@ template language="C#" debug="false" hostspecific="true"#&g ...

  5. DevExpress的TreeList的常用属性设置以及常用事件

    场景 Winform控件-DevExpress18下载安装注册以及在VS中使用: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/1 ...

  6. shell 统计nginx日志中从指定日期到结束日期之间每天指定条件匹配的总次数

    公司给出一个需求,指定时间内,统计请求driver.upload.position(司机位置上报接口)中,来源是华为push(come_from=huawei_push)的数量,要求是按天统计. 看一 ...

  7. Hyper-V + CentOS7 安装教程(视频)

    (双击全屏播放) 一.前言 为什么选择Hyper-V? windowns自带,免费 基础环境 二.虚拟机配置 下载CentOS7镜像 https://www.centos.org/download/ ...

  8. boa移植 boa交叉编译

    官网:http://www.boa.org/ BOA 服务器是一个小巧高效的web服务器,是一个运行于unix或linux下的,支持CGI的.适合于嵌入式系统的单任务的http服务器,源代码开放.性能 ...

  9. Android内部存储与外部存储的文件操作类

    public class SDCardHelper { // 判断SD卡是否被挂载 public static boolean isSDCardMounted() { // return Enviro ...

  10. mysql系列3 SQL语法基础

    1.创建数据库(语法) 2.创建(数据库)表(语法) 复制新的空表举个例子: mysql> use course;Reading table information for completion ...