Kubernetes Is Written in Go, Unlike Borg Which Was Written in C++
Google's Borg ran the company's production workloads for roughly a decade before Kubernetes existed, and it was written in C++. When a small team inside Google started the project that became Kubernetes, announced in June 2014, they were inspired by Borg without reusing it. The internal system was tied to Google's own infrastructure, its internal build tooling, and its private libraries. None of that could be shipped to the public, so the team rebuilt the ideas from scratch and wrote the new system in Go.
The language choice was not a performance argument, and that is the first thing worth understanding. Go had been open sourced by Google in November 2009 specifically as a compiled, garbage collected language with a small syntax and fast builds. That profile fits infrastructure software unusually well. A cluster component is not a numeric hot loop, it is a long running network service that watches state, decodes a lot of JSON, ships a binary into someone else's datacenter, and needs to make progress on hundreds of concurrent streams of work without spawning a thread per connection.
Go's answer to that, goroutines and channels, matches the shape of Kubernetes itself. Every controller in the system is a reconciliation loop: read the desired state, compare it to the observed state, take one step to close the gap, repeat. Hundreds of these loops run at once, and goroutines make thousands of concurrent waits cheap enough to be boring. The standard library carries an HTTP server, a JSON codec, and a TLS stack, so the API server does not need a thick web framework. Cross compilation produces static binaries, which is why you can download one kubelet for ARM and another for x86 and drop them into a machine image without a runtime to install.
The C++ versus Go difference also shows up in the ecosystem that formed around the project. Go compiles fast, so contributors can build the whole tree repeatedly while iterating, which matters enormously for a codebase that thousands of people touch. Because Kubernetes and several of its neighbors, including etcd and client-go, live in the same language, custom controllers and operators in Go get a first class client library: you import client-go, write a reconciliation loop, and you are working with the same objects the API server serves. Tooling built in other languages is welcome at the HTTP and gRPC boundary, but the idiomatic path runs through Go.
None of this makes Go a perfect language, and senior engineers should be honest about the tradeoffs the Kubernetes codebase reveals. Garbage collection makes tail latencies harder to reason about than manual memory management, and the API server team has spent years tuning allocations. Go's error handling, verbose before generics arrived and still verbose afterward, spreads through every layer of a large tree. The type system is deliberately small, which means a lot of behavior is only visible at runtime. Kubernetes accepted those costs in exchange for readability, portable binaries, and a contributor pool larger than any single internal C++ team.
That is the real lesson in the Borg comparison. Borg was built to be excellent inside one company where the build system, hardware, and engineers were all known quantities. Kubernetes was built to be adopted by strangers, so its team optimized for the things strangers need: fast builds from a fresh clone, one binary per component, no exotic dependencies, and a language that a new contributor can read on the first day. Choosing Go over C++ was a choice about who gets to participate, and the platform's spread across every major cloud provider suggests the tradeoff was sound.