Skip to content

syohex/boot2kubernetes

 
 

Repository files navigation

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.

Demo

This demo shows starting kubenetes cluster using boot2k8sand sending request via kubectl (on OSX)

demo

Usage

To up cluster,

$ boot2k8s up

This command pulls required docker images and starts them. You can check which image is used, or which option/command in k8s.yml. After container is running, you can start to run kubectl (You need to install it). If you run docker on boot2docker-vm, it also starts port forwarding server for 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

About

Up single node kubernetes cluseter in one command

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 85.0%
  • Shell 8.5%
  • Makefile 6.5%