Last active
January 8, 2019 10:51
-
-
Save random-robbie/4dc77f476a7dac32fb93e5e26560f4a6 to your computer and use it in GitHub Desktop.
kuberenetes-dashboard-deploy
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 | |
myip=$(ip -4 addr show enp3s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') | |
sudo snap install kubeadm --classic | |
sudo snap install kubectl --classic | |
sudo kubeadm init | |
mkdir -p $HOME/.kube | |
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config | |
sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
helm init | |
kubectl -n kube-system create serviceaccount tiller | |
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller | |
helm init --service-account tiller | |
helm install stable/kubernetes-dashboard --name dashboard-demo | |
kubectl apply -f https://gist.githubusercontent.com/random-robbie/0a239f22f62577a1e504f82103878124/raw/785abeaf22aa0fef6ea0376588c7793b16446a1a/eks-admin-service-account.yaml | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
helm install --name kubeapps --namespace kubeapps bitnami/kubeapps | |
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') | |
echo "[*] Start Your Kube Proxy and browse to https://$myip:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/ [*]" | |
kubectl proxy --address=$myip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment