kubedev
is a development tool which will build kubernetes components. Considering there are already build scripts in kubernetes, kubedev
will do these additional work:
- Pull build images using China mirror source.
- Write version file and give the component right version automatically.
- Build
Binary
,Image
,Rpm
,Deb
(not supported yet) packages directly. - Better log handling.
Make make sure you have the right Golang development environment:
export GO111MODULE=on
# For China uses
export GOPROXY="https://goproxy.cn"
Install kubedev
:
git clone https://github.com/zhouya0/kubedev.git
cd kubedev
make
make install
Going to your kubernetes repo (depending on your own environment):
cd /root/gopath/src/k8s.io/kubernetes
Make sure rpmbuild
is intalled in your environment:
yum install rpm-build
Start kubedev
!
kubedev rpm kubelet
See blow info means building is succeed!
Using config file: /root/.kubedev.yaml
✔︎ Writing version file 📝
✔︎ Building binary kubelet 🔨
Building binary kubelet success! File can be found in:
_output/dockerized/bin/linux/amd64/kubelet
✔︎ Packaging binary to RPM 📦
Building RPM kubelet success! Package can be found in:
/root/rpmbuild/RPMS
Building binary whith arch arm64:
kubedev bin kubectl -a armd64
Building images with specified repo tag:
cat <<EOF >> ~/.kubedev.yaml
DockerRegistry: yaopolytech
DockerTag: v1.18.0
EOF
Then build kube-apiserver
, kube-scheduler
, kube-proxy
images:
kubedev image