Open-Source Wikis

/

Kubernetes

/

By the numbers

kubernetes/kubernetes

By the numbers

A quantitative snapshot of kubernetes/kubernetes.

Data collected on 2026-04-30 at commit 33d5aafbf44131d711cf79aa725d19c7a13e10ac on branch master.

Size

The repository is overwhelmingly Go, with a long tail of YAML manifests, shell scripts, and protobuf contracts.

xychart-beta horizontal
    title "Lines of source code by language"
    x-axis ["Go (test)", "Go (non-test)", "YAML", "Shell", "Proto"]
    y-axis "Lines"
    bar [1413685, 2159256, 350000, 60000, 25000]
Language / category Files Approx. lines
Go (excluding vendor/ and .git/) 12,631 ~3,572,941
Go test files (*_test.go) 3,031 ~1,413,685
Go non-test files ~9,600 ~2,159,256
YAML 5,995
Shell scripts 294
Protobuf 99

The biggest single files are all generated:

File Lines
pkg/generated/openapi/zz_generated.openapi.go 74,310
staging/src/k8s.io/api/core/v1/generated.pb.go 71,339
pkg/apis/core/validation/validation_test.go 31,115

The largest source directory by code volume is staging/src/k8s.io/, which contains the libraries published as standalone modules (api, apimachinery, apiserver, client-go, kubectl, etc.).

Activity

Metric Value
Total commits 137,392
Commits since 2025-01-01 9,905
Unique authors all-time 5,231
First commit 2014-06-06
Most recent commit 2026-04-30
Bot-attributed commits (*[bot] co-authors since 2020) 0

The Kubernetes project does not yet attribute AI-assisted commits in git metadata. The "0 bots" figure above is an explicit lower bound: any AI assistance from interactive tools (Copilot, Cursor, etc.) leaves no trace in commit history. Robot-managed merges are routed through the Kubernetes Prow Robot author identity (3,630 merges since 2025-01-01), but those are CI-driven merges of human PRs, not authored content.

The most active recent contributors (since 2025-01-01, excluding Prow merges):

Author Commits
Patrick Ohly 431
yongruilin 177
Davanum Srinivas 159
Benjamin Elder 156
Dan Winship 151
Joe Betz 140
carlory 123
Tim Hockin 117
Natasha Sarkar 106

Top-level directory churn (rough): the highest-velocity directories are pkg/scheduler/, pkg/kubelet/, staging/src/k8s.io/api/, staging/src/k8s.io/apiserver/, and pkg/registry/ — the same areas that absorb most new feature work.

Complexity

A few snapshot indicators of where complexity concentrates:

  • pkg/scheduler/ alone weighs in at >500,000 lines of Go (much of it generated tests). Single files like pkg/scheduler/schedule_one_test.go (186,871 lines) are the largest non-generated tests in the tree.
  • pkg/kubelet/ has top-level files of 293,556 lines (kubelet_pods_test.go), 171,963 lines (kubelet_test.go), and 150,955 lines (kubelet.go). The kubelet is a single Go package with deep responsibility creep.
  • pkg/apis/core/validation/ holds the canonical validation logic for the core/v1 group; the test file alone is 31,115 lines.
  • pkg/generated/openapi/zz_generated.openapi.go at 74,310 lines is the consolidated OpenAPI schema; staging/src/k8s.io/api/core/v1/generated.pb.go at 71,339 lines is the generated protobuf bindings for core/v1.

A rough count of TODO / FIXME / HACK / XXX comments in pkg/ returns ~1,400 hits, most concentrated in the kubelet, scheduler, and registry layers.

Test footprint

  • 3,031 unit-test files (*_test.go) under non-vendor source.
  • >1.4 million lines of test code, ~40% of the entire Go source base.
  • Integration tests in test/integration/ cover 63 sub-packages (apiserver, scheduler, controllers, dra, garbagecollector, etc.).
  • End-to-end tests in test/e2e/ cover 27 sub-packages.
  • Conformance tests in test/conformance/ define the certification baseline.
  • Fuzz tests in test/fuzz/ exercise API serialization, conversion, validation, and admission.

Module structure

The repo is a single Go module (k8s.io/kubernetes) plus a set of staged modules. There are 35 published k8s.io/* modules under staging/src/k8s.io/, including:

api, apiextensions-apiserver, apimachinery, apiserver, cli-runtime, client-go, cloud-provider, cluster-bootstrap, code-generator, component-base, component-helpers, controller-manager, cri-api, cri-client, cri-streaming, csi-translation-lib, dynamic-resource-allocation, endpointslice, externaljwt, kms, kube-aggregator, kube-controller-manager, kube-proxy, kube-scheduler, kubectl, kubelet, metrics, mount-utils, pod-security-admission, sample-apiserver, sample-cli-plugin, sample-controller, streaming.

These are developed in this repo and published as independent modules at release time so external consumers can depend on them without inheriting the whole kubernetes/kubernetes module graph.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

By the numbers – Kubernetes wiki | Factory