Minikube is a local version of Kubernetes meant to run on Mac or Windows. I’m doing this on a Mac, so I get to use Homebrew to install it (https://brew.sh/).
brew install kubectl
brew install minikube
We are going to use XHyve instead of Virtual Box
brew install docker-machine-driver-xhyve
When you run the Xhyve install and it finishes, it asks you to run these 2 commands:
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
Now it’s setup
minikube start --vm-driver=xhyve (i'm getting message that xhyve is already deprecated and I should switch to hyperkit driver - see https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver for more information.)
Now it’s running
kubectl config current-context (responds with: minikube)
So kubectl allows us to connect and communicate with any cluster, local or remote. Right now it is talking to my local cluster named ‘minikube’, but I could point it to a remote cluster and manage that.
Let’s look at the local nodes.
kubectl get nodes (responds with a little info about my only cluster which is 'minikube')
Now we can stop it:
minikube stop (stops the cluster)
And we can delete it:
minikube delete (deletes cluster)
If we want to run a certain version of K8s:
minikube start --vm-driver=xhyve --kubernetes-version="1.10.0"
It won’t start now.
I was warned not to even mess with minikube. I have killed my terminal session and tried
It is stick at ‘Starting VM…’ Just like it was before I killed the last terminal.
Not sure what to try next. I think I’ll try installing and running without minikube.