I am assuming you have virtualbox installed on your Mac.
To test most of the stuff on k8s you don’t need multiple nodes, running one node cluster is pretty much what you need.
First we need to install kubectl, a tool to interact with kubernetes cluster:
➜ ~ curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s \ https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/darwin/amd64/kubectl \ && chmod +x ./kubectl \ && sudo mv ./kubectl /usr/local/bin/kubectl
Then we need Minikube – which is a tool that provisions and manages single-node Kubernetes clusters:
➜ ~ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.23.0/minikube-darwin-amd64 \ && chmod +x minikube \ && sudo mv minikube /usr/local/bin/
Now we can start the VM:
➜ ~ minikube start Starting local Kubernetes v1.8.0 cluster... Starting VM... Downloading Minikube ISO 140.01 MB / 140.01 MB [============================================] 100.00% 0s Getting VM IP address... Moving files into cluster... Downloading localkube binary 148.56 MB / 148.56 MB [============================================] 100.00% 0s Setting up certs... Connecting to cluster... Setting up kubeconfig... Starting cluster components... Kubectl is now configured to use the cluster.
Let’s check everything is working:
Comments closed