forked from wardviaene/kubernetes-course
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d808a3
commit ced3d15
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Setting up the dashboard | ||
|
||
## Start dashboard | ||
|
||
Create dashboard: | ||
``` | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | ||
``` | ||
|
||
## Create user | ||
|
||
Create sample user (if using RBAC - on by default on new installs with kops / kubeadm): | ||
``` | ||
kubectl create -f sample-user.yaml | ||
``` | ||
|
||
## Get login token: | ||
``` | ||
kubectl -n kube-system get secret | grep admin-user | ||
kubectl -n kube-system describe secret admin-user-token-<id displayed by previous command> | ||
``` | ||
|
||
## Login to dashboard | ||
Go to http://api.yourdomain.com:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/login | ||
|
||
Login: admin | ||
Password: the password that is listed in ~/.kube/config (open file in editor and look for "password: ..." | ||
|
||
Choose for login token and enter the login token from the previous step |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: admin-user | ||
namespace: kube-system | ||
--- | ||
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 |