kubernetes / kubernetes
Production-Grade Container Scheduling and Management.
Kubernetes follows the standard Go project layout at very large scale. Each binary gets a thin entry point under cmd, the real implementation lives under pkg, and the staging directory holds libraries that are published as separate public modules while still being developed inside this repository.
- cmd holds thin entry points only; logic lives in pkg.
- staging solves the problem of shipping public libraries from a monorepo.
- Unit tests colocated with source, while integration and e2e live in a dedicated tree.
Notable Directories
/cmdEntry points for each binary, such as kube-apiserver, kubelet, and kube-scheduler.
/pkgThe bulk of the implementation, organised by component and responsibility.
/staging/src/k8s.ioLibraries published as independent modules but developed in-tree, then mirrored out.
/testIntegration and end-to-end suites, separate from the unit tests that sit beside the code.
Build Your Own Ecosystem
Learn from kubernetes's structure and craft your own software scaffolding.