Public Repository

Last pushed: 2 years ago
Short Description
Environment for developing Kubernetes (the core project). Useful when developing on non-Linux hosts.
Full Description


Why use this image

This image is for people who want to modify code belonging to the core Kubernetes project and compile and run a cluster locally on a non-Linux host through hack/ This is not a way to locally run a project that uses Kubernetes (for that use Minikube).

Using this image

First, make sure you have the Kubernetes source on your host. In this example I will put it in the GOPATH, but its location shouldn't matter:

mkdir $GOPATH/src/
git clone $GOPATH/src/

Then run this image, binding your local docker socket and Kubernetes directory:

docker run -v /var/run/docker.sock:/var/run/docker.sock \
  -v $GOPATH/src/ \
  --name k8s-dev --rm -it alex-charlton/k8s-dev /bin/bash

You are then free to edit Kubernetes from your host and then compile and run a cluster from your k8s-dev image:

root@bcc2570ffab1:/go/src/ ./hack/


Local Kubernetes cluster is running. Press Ctrl-C to shut it down.


To start using your cluster, open up another terminal/tab and run:


  cluster/ config set-cluster local --server=https://localhost:6443 --certificate-authority=/var/run/kubernetes/apiserver.crt
  cluster/ config set-credentials myself --username=admin --password=admin
  cluster/ config set-context local --cluster=local --user=myself
  cluster/ config use-context local

The script will output something similar to the above, when successful. To start using your cluster with kubectl, you can ssh into the container with docker exec -it k8s-dev /bin/bash and paste that last part.

Docker Pull Command