设置GOPATH环境变量
go env -w GO111MODULE=auto
cd $GOPATH
mkdir -p src/k8s.io
cd src/k8s.io
git clone https://github.com/kubernetes/kubernetes.git
cd kubernetes
git checkout release-1.15
设置Goland
File -> Settings -> GO -> GOPATH
勾选 Use GOPATH that's defined in system environment
Project GOPATH -> + -> 选择 kubernetes 目录下的 staging/src
标签:GOPATH,git,kubernetes,src,cd,源码,k8s,下载 From: https://www.cnblogs.com/WJQ2017/p/17556396.html