Docker Desktop에서 Kubernetes Dashboard 설치하기 updated_at: 2025-05-31 09:52

Docker desktop에서 Dashboard 설치하기

kubernetes dashboard 공식문서

대시보드 UI 배포

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.6.1/aio/deploy/recommended.yaml

대시보드 접속 활성화

kubectl proxy

대시보드 접속

대시보드 접속 url : http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/

유저생성

처음 들어가면 "Kubernetes Dashboard" 가 뜨고 "Token" 혹은 "Kubeconfig" 라는 로그인 화면이 뜬다.
먼저 서비스 유저를 생성해 주어야 한다.

유저 생성을 위한 yml 작성

  • adminuser.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kubernetes-dashboard
kubectl apply -f  adminuser.yaml

생성된 유저에게 권한 부여

  • adminuser-role.yaml
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
kubectl apply -f  adminuser-role.yaml

토큰 발행

아래 입력하면 토큰이 발행되는데 개행문자가 있으면 한줄로 연결해야 한다.

kubectl -n kubernetes-dashboard create token admin-user
평점을 남겨주세요
평점 : 2.5
총 투표수 : 1

질문 및 답글