Go to file
Matt Rickard 45b090c9e5 Merge pull request #1742 from r2d4/kubenet-rollback
Don't default to kubenet network plugin
2017-07-25 13:24:45 -07:00
.github Use grep -i to check the ISO version 2017-02-25 10:13:03 +01:00
Godeps Update to Kubernetes 1.7 2017-07-13 09:19:47 -07:00
cmd Don't default to kubenet network plugin 2017-07-25 10:07:10 -07:00
deploy Merge pull request #1436 from Teddy-Schmitz/registry-creds-gcrurl 2017-07-24 10:16:13 -07:00
docs Updated drivers.md for info on Hyper-V machines using dynamic memory management 2017-07-23 22:13:43 +02:00
hack A few tweaks to our hack/* scripts for updating k8s. 2017-07-25 10:56:22 -07:00
installers Automate updates to AUR and brew-cask 2017-06-23 11:00:24 -07:00
logo Added more logo types 2016-08-15 17:43:35 +01:00
pkg Merge pull request #1717 from q3aiml/restore-mount-cmd 2017-07-20 10:21:09 -07:00
test/integration Remove systemd integration test 2017-06-20 14:17:19 -07:00
third_party/go9p Fixed mtime issue for OSX 2017-06-15 11:44:47 -07:00
vendor Update to Kubernetes 1.7 2017-07-13 09:19:47 -07:00
.gitignore Added .vscode to .gitignore 2017-04-07 16:02:37 -07:00
.travis.yml Remove sudo and specific dist from travis 2017-06-29 11:34:23 -07:00
CHANGELOG.md Cut 0.20.0 Release 2017-06-21 11:36:34 -07:00
CONTRIBUTING.md Refactor docs 2017-05-03 14:54:26 -07:00
LICENSE Update License file 2016-04-15 15:44:00 -07:00
MAINTAINERS Add mrick to maintainers 2016-09-02 10:04:18 -07:00
Makefile Merge pull request #1726 from aaron-prindle/tar 2017-07-24 15:16:37 -07:00
README.md Added Linux CI example in README.md 2017-06-22 14:03:14 -07:00
code-of-conduct.md Add COC 2017-06-16 15:25:08 +02:00
test.sh Removed /docs and docs-test from test.sh 2017-04-10 09:47:17 -07:00

README.md

Minikube

Build Status codecov

What is Minikube?

Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

Installation

macOS

brew cask install minikube

Linux

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Windows

Download the minikube-windows-amd64.exe file, rename it to minikube.exe and add it to your path

Linux CI Installation Which Supports Running in a VM (example w/ kubectl installation)

curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl

export MINIKUBE_WANTUPDATENOTIFICATION=false
export MINIKUBE_WANTREPORTERRORPROMPT=false
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
mkdir $HOME/.kube || true
touch $HOME/.kube/config

export KUBECONFIG=$HOME/.kube/config
sudo -E ./minikube start --vm-driver=none --use-vendored-driver

# this for loop waits until kubectl can access the api server that minikube has created
for i in {1..150} # timeout for 5 minutes
do
   ./kubectl get po &> /dev/null
   if [ $? -ne 1 ]; then
      break
  fi
  sleep 2
done

# kubectl commands are now able to interact with minikube cluster

Other ways to install:

We also released a Debian package and Windows installer on our releases page If you maintain a minikube package, please feel free to add it here.

Requirements

Quickstart

Here's a brief demo of minikube usage. If you want to change the VM driver add the appropriate --vm-driver=xxx flag to minikube start. Minikube Supports the following drivers:

$ minikube start
Starting local Kubernetes v1.6.0 cluster...
Starting VM...
SSH-ing files into VM...
Setting up certs...
Starting cluster components...
Connecting to cluster...
Setting up kubeconfig...
Kubectl is now configured to use the cluster.

$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
deployment "hello-minikube" created
$ kubectl expose deployment hello-minikube --type=NodePort
service "hello-minikube" exposed

# We have now launched an echoserver pod but we have to wait until the pod is up before curling/accessing it
# via the exposed service.
# To check whether the pod is up and running we can use the following:
$ kubectl get pod
NAME                              READY     STATUS              RESTARTS   AGE
hello-minikube-3383150820-vctvh   1/1       ContainerCreating   0          3s
# We can see that the pod is still being created from the ContainerCreating status
$ kubectl get pod
NAME                              READY     STATUS    RESTARTS   AGE
hello-minikube-3383150820-vctvh   1/1       Running   0          13s
# We can see that the pod is now Running and we will now be able to curl it:
$ curl $(minikube service hello-minikube --url)
CLIENT VALUES:
client_address=192.168.99.1
command=GET
real path=/
...
$ minikube stop
Stopping local Kubernetes cluster...
Machine stopped.

Interacting With your Cluster

Kubectl

The minikube start command creates a "kubectl context" called "minikube". This context contains the configuration to communicate with your minikube cluster.

Minikube sets this context to default automatically, but if you need to switch back to it in the future, run:

kubectl config use-context minikube,

or pass the context on each command like this: kubectl get pods --context=minikube.

Dashboard

To access the Kubernetes Dashboard, run this command in a shell after starting minikube to get the address:

minikube dashboard

Services

To access a service exposed via a node port, run this command in a shell after starting minikube to get the address:

minikube service [-n NAMESPACE] [--url] NAME

Design

Minikube uses libmachine for provisioning VMs, and localkube (originally written and donated to this project by RedSpread) for running the cluster.

For more information about minikube, see the proposal.

Community