标签:群集 日志 yaml 运行 资源 des mes manage int
Dashboard 介绍一、部署
1、Dashboard的部署配置
cat > dashboard.yaml <<EOF
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: admin
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: admin
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
EOF
2、Dashboard的RBAC配置文件
cat > dashboard-admin.yaml <<EOF
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: admin
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: admin
namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin
namespace: kube-system
labels:
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
EOF
3、部署dashboard
kubectl create -f dashboard.yaml
kubectl create -f dashboard-admin.yaml
二、登陆
1、打开IP:30081
2、获取tocken
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep kubernetes-dashboard-token-jc8gh | awk ‘{print $1}‘) |grep token
将token复制到框内点击登陆,部署完成。
跟着炎炎盐实践k8s---应用部署之Kubernetes Dashboard
标签:群集 日志 yaml 运行 资源 des mes manage int
原文地址:https://blog.51cto.com/13534471/2513896