Created
January 4, 2019 03:48
-
-
Save rcherara/7191211d9692e038e75404a7695dcf03 to your computer and use it in GitHub Desktop.
Setup Kubernetes Dashboard on local workstation for Cluster Docker-For-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
#!/bin/bash | |
# Create a new user using Service Account mechanism of Kubernetes, | |
kubectl apply -f dashboard-adminuser.yaml | |
# Bearer Token | |
# Now we need to find token we can use to log in. | |
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') | |
echo "Now copy the token and paste it into Enter token field on log in screen." | |
# After the dashboard deployement done, open this url in your default browser and log in to Dashboard using bearer token tied | |
echo "http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/#!/overview?namespace=default" | |
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: admin-user | |
namespace: kube-system |
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
#!/bin/bash | |
echo "Deploy Dashboard" | |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml | |
echo "To access Dashboard from your local workstation we create a secure channel to your Kubernetes cluster Docker-Desktop" | |
kubectl proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment