First, you should have Golang 1.18 installed. On MacOS, just run
brew install [email protected]
To generate the proto, you should install protobuf compiler and its Golang plugin. On MacOS, run
brew install [email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
and set your PATH
as
export PATH="$PATH:$(go env GOPATH)/bin"
Now you are ready for building Kuberboat. Simply run
make
and you will see the executable under out/bin
.
You should install Prometheus on the master node (where API server is located). Please ensure that prometheus
is placed under your system binary directory (/usr/local/bin
on Linux). Simply check this by running
prometheus --version
Then, run
./scripts/prometheus/start_prom.sh
This script will start Prometheus based on the requirement of the project.
make start
make stop
make restart # equal to stop and start
It will start a tmux session with five windows:
- shell
- log of kubelet
- log of apiserver
- log of prometheus
- log of etcd container and register your local node to the apiserver.
If you want to start each components seperately, read as follows.
To start the API server, just run
./out/bin/apiserver
To start Kubelet, just run
./out/bin/kubelet
We recommend that you run Kubelet as a superuser (i.e. root or sudo
). Otherwise, you might find some errors after start.
You may use the help flag to get the usage.
kubectl apply -h
kubectl get -h
kubectl describe -h
kubectl delete -h