Local Development with Localkube

This page will give you an overview of how to develop locally with Localkube.

UPDATE: We have donated Localkube code to Minikube, where it now forms the backbone of the official Kubernetes local development solution. We have stopped working on Localkube and highly recommend using Minikube as a local development solution.

Localkube is a fully networked Kubernetes 1.2 cluster that runs on your local machine and can be started with Spread in one command.

In order to use localkube, the following should be installed:

(Note: For Mac and Windows users, the fastest way to install everything is Docker Toolbox.)

To use localkube:

  1. Create a machine called dev: docker-machine create --driver virtualbox dev
  2. Start your docker-machine: docker-machine start dev
  3. Connect to the docker daemon: eval "$(docker-machine env dev)"
  4. Spin up a local cluster using localkube: spread cluster start
  5. To stop the cluster: spread cluster stop

*For local development, it's useful to also install kubectl, the command line tool for interacting with the Kubernetes API. You can download kubectl from the Kubernetes release artifact site with the curl tool.

Linux:

$ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.2.3/bin/linux/amd64/kubectl

Darwin:

$ curl -O https://storage.googleapis.com/kubernetes-release/release/v1.2.3/bin/darwin/amd64/kubectl

After downloading the binary, ensure it is executable and move it into your PATH:

$ chmod +x kubectl  
$ mv kubectl /usr/local/bin/kubectl

Did this page help you?