Run single node kubernetes cluseter in one command
Go Shell Makefile
Latest commit e6a51b7 Aug 20, 2015 @tcnksm Add slide link
Permalink
Failed to load latest commit information.
command Correct misspellings Aug 18, 2015
config Change directory Aug 8, 2015
scripts Include commit hash Aug 17, 2015
.gitignore Ignore tmp_gopath Aug 17, 2015
CHANGELOG.md Initial commit Aug 8, 2015
LICENSE Add LICENSE Aug 8, 2015
Makefile Less verbose Aug 17, 2015
README.md Add slide link Aug 19, 2015
ROADMAP.md Correct misspellings Aug 18, 2015
cli.go Change project name and import path Aug 10, 2015
commands.go Add list command Aug 17, 2015
main.go Fix arg Aug 8, 2015
version.go Initial commit Aug 8, 2015

README.md

boot2kubernetes

GitHub release MIT License Go Documentation

boot2k8s starts single node kubernetes cluster in one command using docker 🐳. The purpose of this project is building kubernetes in fast way for testing or experiment on your development environment. Kubernetes version is 1.0.x.

I gave a talk about boot2kubernetes at Docker meetup Tokyo #5, slide

Usage

To up cluster,

$ boot2k8s up

This command pulls required docker images and starts them. You can check which docker image/option/command is used in k8s.yml. After container is running, you can start to use kubectl (You need to install it by yourself). If you run docker on boot2docker-vm, it also starts port forwarding server to connect master APIs via local kubectl.

To destroy cluster,

$ boot2k8s destroy

This command will destroy kubernetes containers started by boot2k8s. Not only that but also remove containers which are started by kubernetes (will ask confirmation).

Install

If you use OSX, you can use homebrew,

$ brew tap tcnksm/boot2k8s
$ brew install boot2k8s

If you are on other platform, download a binary from release page and place it on your $PATH.

Contribution

  1. Fork (https://github.com/tcnksm/boot2kubernetes/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

To build boot2k8s from source, use go get and make,

$ go get -d github.com/tcnksm/boot2kubernetes
$ cd $GOPATH/src/github.com/tcnksm/boot2kubernetes
$ make build

After this, binary is in ./bin directory.

References

What boot2k8s does is same as official doc "Running Kubernetes locally via Docker" describes. If you don't want to install additional fancy binary on your PC, should follow that article. I also inspired by an article "1 command to Kubernetes with Docker compose", thanks.

Author

Taichi Nakashima