Skip to content
이구용 edited this page Feb 27, 2019 · 4 revisions

쿠버네티스 기본 셋팅

https://github.com/kubernetes-sigs/kubespray

UI 대시보드 사용을 위한 인증 정보 추가

cat > dashboard-adminuser.yaml <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
  name: admin-user
  namespace: kube-system
EOF

cat > dashboard-adminuser-role.yaml <<EOF
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: kube-system
EOF

kubectl create -f dashboard-adminuser.yaml -f dashboard-adminuser-role.yaml

인증 Token 확인

kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')

대시보드 URL 확인

kubecel cluster-info

Kubernetes master is running at https://192.168.23.63:6443
coredns is running at https://192.168.23.63:6443/api/v1/namespaces/kube-system/services/coredns:dns/proxy
**kubernetes-dashboard is running at https://192.168.23.63:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy**
KubeRegistry is running at https://192.168.23.63:6443/api/v1/namespaces/kube-system/services/registry:registry/proxy