dashboard-adminuser.yaml 705 B

1234567891011121314151617181920212223
  1. apiVersion: v1
  2. kind: ServiceAccount
  3. metadata:
  4. name: admin-user
  5. namespace: kubernetes-dashboard
  6. ---
  7. apiVersion: rbac.authorization.k8s.io/v1
  8. kind: ClusterRoleBinding
  9. metadata:
  10. name: admin-user
  11. roleRef:
  12. apiGroup: rbac.authorization.k8s.io
  13. kind: ClusterRole
  14. name: cluster-admin
  15. subjects:
  16. - kind: ServiceAccount
  17. name: admin-user
  18. namespace: kubernetes-dashboard
  19. # run command to install kubernets dashboard
  20. # kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
  21. # run command to get a token authentication
  22. # kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')