Skip to content

Instantly share code, notes, and snippets.

@swamibluedata
Last active December 7, 2017 17:24
Show Gist options
  • Save swamibluedata/fefe0c29ddfb33612b0c41e3a485cf54 to your computer and use it in GitHub Desktop.
Save swamibluedata/fefe0c29ddfb33612b0c41e3a485cf54 to your computer and use it in GitHub Desktop.
# 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