File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.1/aio/deploy/recommended.yaml
2
+ kubectl get svc kubernetes-dashboard -n kubernetes-dashboard
3
+ kubectl edit svc kubernetes-dashboard -n kubernetes-dashboard
4
+ kubectl get pods -n kubernetes-dashboard -o wide
5
+
6
+ --
7
+ # Create service account
8
+ kubectl create serviceaccount cluster-admin-dashboard-sa
9
+ # Bind ClusterAdmin role to the service account
10
+ kubectl create clusterrolebinding cluster-admin-dashboard-sa \
11
+ --clusterrole=cluster-admin \
12
+ --serviceaccount=default:cluster-admin-dashboard-sa
13
+ # Parse the token
14
+ TOKEN=$(kubectl describe secret $(kubectl -n kube-system get secret | awk '/^cluster-admin-dashboardsa-
15
+ token-/{print $1}') | awk '$1=="token:"{print $2}')
16
+
17
+ echo $TOKEN
18
+
You can’t perform that action at this time.
0 commit comments