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 installGoing to your kubernetes repo (depending on your own environment):
cd /root/gopath/src/k8s.io/kubernetesMake sure rpmbuild is intalled in your environment:
yum install rpm-buildStart kubedev!
kubedev rpm kubeletSee 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 armd64Building images with specified repo tag:
cat <<EOF >> ~/.kubedev.yaml
DockerRegistry: yaopolytech
DockerTag: v1.18.0
EOFThen build kube-apiserver, kube-scheduler, kube-proxyimages:
kubedev images