Go to file
aprindle 4098745500 Added ssh integration test and updated RunCommand in util.go 2016-06-01 15:26:17 -07:00
Godeps Update libmachine code to pick up misc. bug fixes. 2016-05-24 13:54:39 -07:00
cmd Add a retry utility to util, and use it to retry cluster creation. 2016-06-01 13:53:09 -07:00
deploy Fixed issue with wrong static-pods location in Makefile 2016-06-01 01:56:31 +05:30
hack Build localkube statically, use a python container to remove the python dep on the build env, and use kube-cross for building on non-linux 2016-05-25 23:23:12 +03:00
pkg Add a retry utility to util, and use it to retry cluster creation. 2016-06-01 13:53:09 -07:00
test/integration Added ssh integration test and updated RunCommand in util.go 2016-06-01 15:26:17 -07:00
vendor Update libmachine code to pick up misc. bug fixes. 2016-05-24 13:54:39 -07:00
.gitignore Switch from .gopath to _gopath to be consistent with kubernetes. 2016-05-24 10:54:24 -07:00
.travis.yml Add a Makefile to replace build.sh and test.sh. 2016-05-04 14:45:06 -07:00
CONTRIBUTING.md Add CONTRIBUTING.md 2016-04-25 10:42:07 -07:00
LICENSE Update License file 2016-04-15 15:44:00 -07:00
Makefile Fix "make integration". 2016-06-01 11:28:23 -07:00
README.md README fix. 2016-05-30 10:19:50 -07:00
test.sh Use python on host if present, otherwise fallback on python dockerized 2016-05-28 00:09:16 +03:00

README.md

Minikube

Run Kubernetes locally

Build Status

Background

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.

Requirements For Running Minikube

  • VirtualBox installation
  • VT-x/AMD-v virtualization must be enabled in BIOS

Usage

Here's a brief demo of minikube usage. We're using the code from this Kubernetes tutorial. Note that the IP below is dynamic and can change. It can be retrieved with minikube ip.

$ minikube start
Starting local Kubernetes cluster...
Running pre-create checks...
Creating machine...
Starting local Kubernetes cluster...
Kubernetes is available at https://192.168.99.100:443.

$ eval $(minikube docker-env)
$ docker build -t helloworld .
Successfully built d16fe85e1abe
$ kubectl run hello-minikube --image=helloworld --hostport=8000 --port=8080 --generator=run-pod/v1
pod "hello-minikube" created
$ curl http://$(minikube ip):8000
Hello World!
$ minikube stop
Stopping local Kubernetes cluster...
Stopping "minikubeVM"...

Features

  • Minikube packages and configures a Linux VM, Docker and all Kubernetes components, optimized for local development.
  • Minikube supports Kubernetes features such as:
    • DNS
    • NodePorts
    • ConfigMaps and Secrets
    • Dashboards

Known Issues

  • Features that require a Cloud Provider will not work in Minikube. These include:
  • LoadBalancers
  • PersistentVolumes
  • Ingress
  • Features that require multiple nodes. These include:
  • Advanced scheduling policies
  • DaemonSets
  • Alternate runtimes, like rkt.

If you need these features, don't worry! We're planning to add these to minikube over time. Please leave a note in the issue tracker about how you'd like to use minikube!

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.

Goals

  • Works across multiple OSes - OS X, Linux and Windows primarily.
  • Single command setup and teardown UX.
  • Unified UX across OSes
  • Minimal dependencies on third party software.
  • Minimal resource overhead.
  • Replace any other alternatives to local cluster deployment.

Non Goals

  • Simplifying kubernetes production deployment experience. Kube-deploy is attempting to tackle this problem.
  • Supporting all possible deployment configurations of Kubernetes like various types of storage, networking, etc.

Development Guide

See CONTRIBUTING.md for an overview of how to send pull requests.

Build Requirements

  • A recent Go distribution (>1.6)
  • If you're not on Linux, you'll need a Docker installation

Build Instructions

make out/minikube

Run Instructions

Start the cluster using your built minikube with:

$ ./out/minikube start

Running Tests

Unit Tests

Unit tests are run on Travis before code is merged. To run as part of a development cycle:

make test

Integration Tests

Integration tests are currently run manually. To run them, build the binary and run the tests:

make integration

Conformance Tests

These are kubernetes tests that run against an arbitrary cluster and exercise a wide range of kubernetes features. You can run these against minikube by following these steps:

  • Clone the kubernetes repo somewhere on your system.
  • Run make quick-release in the k8s repo.
  • Start up a minikube cluster with: minikube start.
  • Set these two environment variables:
export KUBECONFIG=$HOME/.kube/config
export KUBERNETES_CONFORMANCE_TEST=y
  • Run the tests (from the k8s repo):
go run hack/e2e.go -v --test --test_args="--ginkgo.focus=\[Conformance\]" --check_version_skew=false --check_node_count=false