Minikube

From XennisWiki
Jump to: navigation, search

Minikube is a tool that runs a single-node Kubernetes cluster in a virtual machine on a local machine.

Installation

Further information: Installation instructions for releases

  • Requirements: VirtualBox is installed (for alternatives see link above)
  • (1) Download Minikube, (2) make the file executable and (3) copy it into your local binaries (on Arch Linux install the minikube package)
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
sudo mv minikube /usr/local/bin/

Activate completion

  • Bash: source <(minikube completion bash)
  • Zsh: source <(minikube completion zsh)

Example usage

Start Minicube and run a container

minikube start
kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment hello-minikube --type=NodePort

(1) List your pods and (2) curl the services

kubectl get pod
curl $(minikube service hello-minikube --url)

Stop the cluster

minikube stop

See also

External links