Local and standalone Kubernetes API Server, always by your side.
Kube Boat requires following tools are installed in local machines.
$ go install github.com/hhiroshell/kube-boat@latest
Make sure environment variables of Envtest framework has been set appropriately. Kube Boat executes Kubernetes API Server using the framework. So these variables affects to behavior of the API Server.
Then, you can start a Kubernetes API Server by boat start
.
$ boat start
Starting local Kubernetes API server...
🚤 🚤 🚤 🚤 🚤 🚤 🚤 🚤 🚤 🚤
...Done.
Your kubectl context can be updated by boat kubeconfig
.
$ boat kubeconfig
$ kubectl config current-context
kube-boat
$ kubectl get namespaces
NAME STATUS AGE
default Active 22s
kube-node-lease Active 27s
kube-public Active 27s
kube-system Active 27s
To stop the local API Server, use boat stop
sub command.
$ boat stop
shutting down the API server...
When you start local Kubernetes API Server, you can set paths to the directory or file containing manifests of
CustomResourceDefinition with --crd-path
flag.
With this flag, the API Server will start with the CRDs installed.
$ boat start --crd-path=./example/crd/crontabs.stable.example.com.yaml
$ kubectl api-resources --api-group=stable.example.com
NAME SHORTNAMES APIVERSION NAMESPACED KIND
crontabs ct stable.example.com/v1 true CronTab
Kube Boat is licensed under the Apache License 2.0, and includes works distributed under same one or the MIT License.