Install docker-machine-driver-hyperkit
brew update
brew install hyperkit
brew install docker-machine-driver-hyperkit
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
Install Minikube
Download the latest release minikube-darwin-amd64 on https://github.com/kubernetes/minikube/releases (I downloaded v1.4.0)
Rename it to minikube
,move to $PATH
, like this:
mv ~/Downloads/minikube-darwin-amd64 ~/Downloads/minikube
mv ~/Downloads/minikube /usr/local/bin/
chmod +x /usr/local/bin/minikube
minikube version
If you can see the versions of your Minikube, this means you are succeed.
Install kubectl
Download the latest kubectl
cd ~/Downloads
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/darwin/amd64/kubectl
change the permission,move to $PATH
chmod +x ~/Downloads/kubectl
mv ~/Downloads/kubectl /usr/local/bin/
kubectl --help
If can output help information of kubectl,that means success.
Start Minikube
We use hyperkit-driver as our virtualization driver, so we need to add a param when starting the Minikube.
minikube start --vm-driver=hyperkit
Output:
Done! kubectl is now configured to use "minikube"
succeed.
Now, use your kubectl to test kubernetes cluster.
kubectl get nodes
If list the information of nodes(just one node), that means your Mini Kubernetes cluster starts successfully!
Stop
minikube stop