I have a work project coming up where I'll need to build custom controllers for some internal applications. I've started working through the Kubebuilder book to learn the fundamentals, but I'm looking for additional tutorials, examples, or practical guidance—especially material covering real-world concerns and common controller pitfalls.
5 Answers
A useful path is to study client-go directly alongside small examples. There are hands-on client-go examples, a preconfigured development environment for experimenting, and a series covering how to work with the Kubernetes API. That combination helps connect the concepts from Kubebuilder to the underlying APIs.
The fastest way to learn is usually to build something small and let the implementation expose what you need to study. It also helps to use an AI assistant for explanations and for generating tests, especially envtest cases that set up multiple Kubernetes objects and otherwise involve a lot of repetitive boilerplate.
Writing a small operator directly with Go and client-go can make the whole model much less mysterious. At its core, a controller watches the API and reacts to events, but the important lessons are in details like deduplication, concurrency, retries, dynamic clients, and typed clientsets.
The Kubebuilder book is still one of the best structured resources for this. It walks through building operators and custom resources in an interactive, fairly comprehensive way, so it’s worth completing even if you also use other examples.
Reading real operator code is incredibly valuable. Projects such as CloudNativePG, Strimzi, Apache Flink, and Flux provide examples of how production controllers are organized and how they handle reconciliation, status updates, errors, and lifecycle concerns.

That makes sense, though I’m particularly interested in write-ups about production pitfalls and design trade-offs, not just getting a basic controller running.