Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save apurvc/ae37999c9a72c72a72807f4389bfb28b to your computer and use it in GitHub Desktop.
Save apurvc/ae37999c9a72c72a72807f4389bfb28b to your computer and use it in GitHub Desktop.
Install kubectl
---------------
curl -LO curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/darwin/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
Install minikube
---------------
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.35.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
Install virtulization driver
----------------------------
brew install xhyve
brew install docker-machine-driver-xhyve
sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
Start minikube
--------------
minikube start --vm-driver=xhyve (ideally this should work here, for me it was already installed so had to first remove the config)
rm -rf $HOME/.minikube
minikube start --vm-driver=xhyve
Verification :
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment hello-minikube --type=NodePort
kubectl get pod [If kubectl version is 1.11 this step fails]
Delete existing vm
------------------
minikube delete -p minikube
References:
1: https://whatdafox.com/install-kubectl-and-minikube-on-mac-os-mojave-ece759f38411 (this didn't work for me).
2: https://blog.arkey.fr/2018/06/18/minikube-with-hyperkit/ (After trying with 1 I followed this which worked for me).
3: https://github.com/kubernetes/kubernetes/issues/65575
4: https://stackoverflow.com/questions/49524292/how-to-confirm-minikube-is-using-hyperkit
Update:
Was able to run minikube with hyperkit, by deleting the existing xhyve vm and starting minikube with hyperkit.
1. minikube delete -p minikube
2. brew tap markeissler/hyperkit
3. brew install hyperkit
4. minikube start --vm-driver hyperkit.
5. minikube dashboard (get the dashboard opened in a browser)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment