Kubectl
Contribute to Kubectl
Attend a sig-cli meeting
The best way to get started is to attend sig-cli meetings. The bug scrub is a great place to pick up an issue to work on.
Checking out the code
Install golang
Install the latest version of go
Get a copy of the code
Fork and clone the kubernetes repository
git clone git@github.com/USER/kubernetes
cd kubernetes
Build the binary
Build the binary using go build
cd cmd/kubectl
go build -v
./kubectl version
Edit the code
The kubectl code is under staging/src/k8s.io/kubectl
.
- Libraries are under
staging/src/k8s.io/kubectl/pkg
- Command implementations are under
staging/src/k8s.io/kubectl/pkg/cmd
Learning about libraries
Kubectl uses a number of common libraries
- cobra – a golang framework for CLIs
- client-go – libraries for talking to the Kubernetes apiserver
- api – Kubernetes types
- apimachinery – Kubernetes apimachinery libraries
Additional resources
当前内容版权归 kubernetes官网 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 kubernetes官网 .