前言:kubernetes核心组件服务启动正常

一、在kubernetes-dashboard.yaml父级文件夹下创建account.yaml文件用于访问kubernetes-dashboard,添加如下配置

# Create Service AccountapiVersion: v1 
kind: ServiceAccount 
metadata:   
  name: admin-user   
  namespace: kube-system 
---# Create ClusterRoleBindingapiVersion: rbac.authorization.k8s.io/v1beta1 
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 -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')
获取输出的token粘贴复制到kubernetes-dashboard登陆页面获取授权

GitHub 加速计划 / da / dashboard
10
2
下载
General-purpose web UI for Kubernetes clusters
最近提交(Master分支:4 个月前 )
0ba796d9 Added important notice about project status and alternatives. Signed-off-by: Sebastian Florek <s.florek91@gmail.com> 6 天前
49406263 * chore(chart): release 7.14.0 * chore(code): fix lint * chore(go): bump Go version to 1.24.0 and update module dependencies * chore(go): update used go version to 1.24.0 * chore(docker): update base image to golang:1.24-alpine3.22 across all Dockerfiles 2 个月前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐