0
点赞
收藏
分享

微信扫一扫

kube-dashboard

DYBOY 2023-04-21 阅读 67

kubernetes v1.26.x

  • yaml部署

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
# 修改配置,如service type: NodePort等

  • helm部署

helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard \
 --set=service.type=NodePort --set=service.nodePort=30011

dashboard-rbac.yaml

apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
---
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: kubernetes-dashboard

  • Getting a Bearer Token

kubectl -n kubernetes-dashboard create token admin-user

copy the token and paste it into the  dashboard

  • login kubernetes Dashboard

https://localhost:30011

kube-dashboard_dashboard


kube-dashboard_dashboard_02


举报

相关推荐

0 条评论