# Kubernetes vs Docker Compose: source lines of code compared

The Kubernetes vs Docker Compose comparison on OctoCounts shows side-by-side source line counts for kubernetes/kubernetes and docker/compose, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-10-11, kubernetes/kubernetes contains 4,846,648 total lines (3,899,767 code) across 14,986 files, while docker/compose contains 82,030 total lines (58,932 code) across 603 files as of 2026-10-10. kubernetes/kubernetes is about 66x the size of docker/compose by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [kubernetes/kubernetes](https://octocounts.com/github/kubernetes/kubernetes) | [docker/compose](https://octocounts.com/github/docker/compose) |
| --- | ---: | ---: |
| Files | 14,986 | 603 |
| Total lines | 4,846,648 | 82,030 |
| Code lines | 3,899,767 | 58,932 |
| Comment lines | 641,421 | 14,367 |
| Blank lines | 305,460 | 8,731 |
| Languages counted | 12 | 9 |

Top languages in kubernetes/kubernetes: Go (65.9% of code), JSON (26.2% of code), YAML (6.6% of code). Top languages in docker/compose: Go (95.3% of code), YAML (3.7% of code), Dockerfile (0.5% of code). Go, YAML appear in both top language lists; JSON, Shell, PO File appear only in kubernetes/kubernetes's top languages; Dockerfile, HCL, Makefile appear only in docker/compose's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. kubernetes/kubernetes was counted at ref master (commit b27a4f0d4767) on 2026-10-11; docker/compose was counted at ref main (commit e11dce59fca0) on 2026-10-10. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

kubernetes/kubernetes counts the Kubernetes core monorepo: API server, scheduler, kubelet, controllers, client libraries, and a substantial amount of generated code and tests. docker/compose counts the Compose CLI — the single tool that defines and runs multi-container applications, written in Go. The two repositories are different kinds of software at different scales, and the counts were taken on the dates shown above.

The totals differ by orders of magnitude because the scope does: one tree is a distributed control plane with many components, the other is one command-line tool — so the comparison is best read as a scale reference, not a contest.

Both counted trees are predominantly Go as the per-language tables show, which makes the language mix unremarkable here and puts the entire weight of the difference on repository scope rather than implementation language.

_Do not read this as a Kubernetes-replaces-Compose (or vice versa) verdict from the numbers: Compose targets local multi-container development, Kubernetes targets cluster orchestration. The smaller count does not mean the smaller tool is insufficient for its own use case._

Sources: [kubernetes/kubernetes repository (core monorepo)](https://github.com/kubernetes/kubernetes) · [docker/compose repository](https://github.com/docker/compose). Statements verified 2026-09-16.

Evidence and next steps:

- [kubernetes/kubernetes SLOC report](https://octocounts.com/github/kubernetes/kubernetes)
- [docker/compose SLOC report](https://octocounts.com/github/docker/compose)
- [Compare kubernetes/kubernetes and docker/compose interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fkubernetes%2Fkubernetes&right=https%3A%2F%2Fgithub.com%2Fdocker%2Fcompose)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, kubernetes/kubernetes or docker/compose?

kubernetes/kubernetes has more code: 3,899,767 code lines versus 58,932 for docker/compose, about 66x as much, based on cached OctoCounts reports as of 2026-10-11.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for kubernetes/kubernetes, docker/compose, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. kubernetes/kubernetes was counted at ref master (commit b27a4f0d4767) on 2026-10-11; docker/compose was counted at ref main (commit e11dce59fca0) on 2026-10-10. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
