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.
This demo shows starting kubenetes cluster using boot2k8s
and sending request via kubectl
(on OSX)
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).
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
.
- 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.
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.