boot2kubernetes
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
- Fork (https://github.com/tcnksm/boot2kubernetes/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./...
command and confirm that it passes
- Run
gofmt -s
- 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