go环境

version:

[root@k8s-bj-zw-bgp4 kubernetes-1.13.8]# go version

go version go1.12.7 linux/amd64

编译kubernetes 1.13.8版本

[root@k8s-bj-zw-bgp4 kubernetes-1.13.8]# pwd

/root/kubernetes-1.13.8

[root@k8s-bj-zw-bgp4 kubernetes-1.13.8]# ls

api          CHANGELOG-1.13.md  cmd                 docs    LICENSE   Makefile.generated_files  pkg        SECURITY_CONTACTS  test          vendor

build        CHANGELOG.md       code-of-conduct.md  Godeps  logo      OWNERS                    plugin     staging            third_party   WORKSPACE

BUILD.bazel  cluster            CONTRIBUTING.md     hack    Makefile  OWNERS_ALIASES            README.md  SUPPORT.md         translations

[root@k8s-bj-zw-bgp4 kubernetes-1.13.8]# make

查看编译输出

[root@k8s-bj-zw-bgp4 bin]# pwd

/root/kubernetes-1.13.8/_output/bin

[root@k8s-bj-zw-bgp4 bin]# ls

apiextensions-apiserver   deepcopy-gen   e2e.test     genman              ginkgo      hyperkube       kube-controller-manager  kubemark        linkcheck

cloud-controller-manager  defaulter-gen  gendocs      genswaggertypedocs  go2make     kubeadm         kubectl                  kube-proxy      mounter

conversion-gen            e2e_node.test  genkubedocs  genyaml             go-bindata  kube-apiserver  kubelet                  kube-scheduler  openapi-gen

查看编译版本

[root@k8s-bj-zw-bgp4 bin]# ./kube-apiserver --version

Kubernetes v1.13.8

[root@k8s-bj-zw-bgp4 bin]# ./kubectl version

Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.8", GitCommit:"0c6d31a99f81476dfc9871ba3cf3f597bec29b58", GitTreeState:"archive", BuildDate:"2019-07-30T03:36:51Z", GoVersion:"go1.12.7", Compiler:"gc", Platform:"linux/amd64"}