https://github.com/kubernetes/community/blob/master/contributors/devel/development.md# Building-kubernetes-on-a-local-osshell-environment
Download various mirrors as required
Go get GITHUB.COM/TOOLS/GODEP
Download Kubernetes code placed in a temp directory
Then create the K8s.io under Gopath because the import path of the code inside the source is k8s.io/xxx/xxx
After creating the K8s.io, the Kubernertes code is tested to K8s.io below
Cp-r/home/allen/tmp/kubernetes $GOPATH/k8s.io/kubernetes
Installing GODEP, equivalent to the Java Maven
Go get GITHUB.COM/TOOLS/GODEP
Enter the Kubernetes directory with the Godeps folder below
Current project directory Run
GODEP Restore
After GODEP restore executes, GODEP will follow the Godeps/godeps.json list and execute go get-d-V to download the corresponding dependency package to the Gopath path.
sudo build/run.sh make cross kube_fastbuild=true arch=amd64
CD Cluster/images/hyperkube
sudo make version=your-version arch=amd64 build
Your first build image
Build local Kubernetes env