Created
April 16, 2018 03:18
-
-
Save Horaddrim/6130ff15fe8c9c5f501766e0faf38c97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube | |
| curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl | |
| export MINIKUBE_WANTUPDATENOTIFICATION=false | |
| export MINIKUBE_WANTREPORTERRORPROMPT=false | |
| export MINIKUBE_HOME=$HOME | |
| export CHANGE_MINIKUBE_NONE_USER=true | |
| mkdir $HOME/.kube || true | |
| touch $HOME/.kube/config | |
| export KUBECONFIG=$HOME/.kube/config | |
| sudo -E ./minikube start --vm-driver=none | |
| # this for loop waits until kubectl can access the api server that Minikube has created | |
| for i in {1..150}; do # timeout for 5 minutes | |
| ./kubectl get po &> /dev/null | |
| if [ $? -ne 1 ]; then | |
| break | |
| fi | |
| sleep 2 | |
| done | |
| # kubectl commands are now able to interact with Minikube cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment