Last active
December 7, 2017 17:24
-
-
Save swamibluedata/fefe0c29ddfb33612b0c41e3a485cf54 to your computer and use it in GitHub Desktop.
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
# Launch dashboard | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
# Give full admin privileges to admin | |
cat >/tmp/dashboard-admin.yaml << EOF | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: kubernetes-dashboard | |
labels: | |
k8s-app: kubernetes-dashboard | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: cluster-admin | |
subjects: | |
- kind: ServiceAccount | |
name: kubernetes-dashboard | |
namespace: kube-system | |
EOF | |
kubectl create -f /tmp/dashboard-admin.yaml | |
# Fetch kube config from the master node | |
scp root@<ip>:.kube/config ~/.kube/config | |
# From local machine | |
kubectl proxy | |
# You should be able to access it now. Skip authentication | |
http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment