跟着炎炎盐实践k8s---应用部署之Kubernetes Dashboard
Dashboard 介绍
仪表板是Kubernetes提供给用户的图形化界面。可以使用仪表板来查看群集上运行的容器应用,以及创建或修改Kubernetes资源(例如部署,作业,守护进程等),还可以启动滚动更新,重新启动Pod或部署新应用程序,查看日志、事件等。
仪表板是Kubernetes提供给用户的图形化界面。可以使用仪表板来查看群集上运行的容器应用,以及创建或修改Kubernetes资源(例如部署,作业,守护进程等),还可以启动滚动更新,重新启动Pod或部署新应用程序,查看日志、事件等。
一、部署
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复制到框内点击登陆,部署完成。
相关推荐
kunyus 2020-10-28
hubanbei00的家园 2020-10-25
btqszl 2020-10-21
shurenyun 2020-08-19
CurrentJ 2020-08-18
朱培知浅ZLH 2020-11-16
cdbdqn00 2020-11-12
达观数据 2020-11-11
JustinChia 2020-11-11
远远的山 2020-11-09
jingtao 2020-11-08
大叔比较胖 2020-10-30
gracecxj 2020-10-30
onepiecedn 2020-10-29
JustHaveTry 2020-10-27
锋锋 2020-10-26
谢恩铭 2020-10-23
kaidiphp 2020-10-13
guchengxinfen 2020-10-12