What’s the best way for a platform engineer to learn Go for Kubernetes operators?
Asked by
~ask me tomorrow
I've been a platform engineer for about three years. I'm comfortable troubleshooting Kubernetes issues and maintaining complex Helm charts, but I struggle to follow the Go code in the operators we use. Our team plans to build custom controllers next year, so I want to learn Go properly, with my employer covering the training. I'm considering Ardan Labs, Boot.dev, and a Linux Foundation certification track. For people who came to Go from an operations background, what helped the language and operator patterns finally click?
Answers
Don’t feel like you have to learn all of Go in isolation first. Learn enough of the language to be productive, then follow one small operator from setup through reconciliation. Writing a couple of toy controllers and comparing them with real Kubernetes code makes the architecture much easier to recognize.
Reply to this answer
Use a gradual progression: write a basic controller yourself, build another using controller-runtime, and then turn one into a complete operator. Kubebuilder’s book is a useful guide for the Kubernetes-specific parts. Pay attention to reconciliation loops, CRDs, status subresources, finalizers, owner references, and work queues. Once those patterns become familiar, most operators stop looking like magic.
Reply to this answer
Ardan Labs is a strong option if you want a deeper Go course, while Boot.dev can be useful for learning the language itself. Neither should be expected to teach controller development in detail, though, so pair the course with the official Go learning materials and a hands-on project. Building something simple, such as a small service or bot, can also help the syntax click before you deal with Kubernetes APIs.
Reply to this answer
Learn the Go fundamentals before jumping into a framework: the standard library, interfaces, error handling, goroutines, channels, and how data flows through a program. The syntax is usually not the difficult part for someone coming from operations; Go’s design patterns are. After that, read smaller Kubernetes components rather than trying to understand a huge operator all at once.
Reply to this answer
Add your answer
Answers are reviewed before publication.
as you were: Starting with a tiny operator is important. A project like cert-manager has too much machinery to be a good first codebase to study.