Writing Kube Controllers for Everyone
summary
A practical recipe for real controllers: code is a main loop that pops meta namespace keys from a rate‑limited queue (commonly an exponential failure limiter), looks up objects via the shared informers cache and listers, deep copies before mutating, updates status and emits events. CronJob controller is ~400–1,000 lines and currently doesn’t use shared informers (a known flaw). Use ownerReferences for garbage collection, follow the 11 rules, and test with hundreds of table cases.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:55Controllers
- 3:25Where to start
- 6:15Queue
- 8:05Sheraton Format
- 10:40Event Handlers
- 13:40Main Loop
- 17:45Picture
- 18:45Closing Remarks
- 22:50Observed Generation
- 28:00Operator Framework
- 29:00Writing controllers in different languages
- 31:05Controllers in pods
- 34:45Notifications
- 35:20Leader Election
- 36:15Conformance Testing
related talks
32mDon't Write Controllers Like Charlie Don't Does: Avoiding Common Kubernetes Controller Mistakes
27mDemystifying Why the World Is Built on Kubernetes: Learning To Leverage Bespoke CRDs and Controllers
37mBeyond Kubebuilder - Generating Entire Kubernetes Controller Implementations
43mDeep Dive: Apps SIG
26mMetaController: Build K8s Controllers as Declarative Intents
01h 27mTutorial: How To Write a Reconciler Using K8s Controller-Runtime!
42mSometimes a Controller is Just a Controller
31mDebugging Kubernetes Controllers from IDE
