It's all about reconciliation - anatomy of a kubernetes controller
summary
Explains how a controller actually reconciles: read desired state from spec, fetch live objects from a synced local cache, and converge using a retrying work loop that uses shared informers and a workqueue rate-limiting backoff (default exponential). Shows using client-go clientsets, generated client/informer/lister code for CRDs versus the dynamic client map approach, and operator-sdk’s primary/secondary CR pattern with ownerReferences and garbage collection. Demonstrates cache-sync before consumers and that these battle‑tested patterns avoid missed events and racey retries.
AI-written summary · about
chapters (15)
- 0:00Introduction to talk
- 2:31Kubernetes declarative model
- 5:41Handling conflicts in cluster
- 8:56Kubernetes types and structure
- 11:27Interacting with cluster in Go
- 13:53Informers and shared informers
- 15:39Workqueue for event handling
- 18:28Putting it all together
- 20:37Custom Resource Definitions
- 23:11Code generation for CRDs
- 23:54Dynamic client alternative
- 25:21Introduction to operators
- 27:30Reconciliation loop in operators
- 29:16Operator lifecycle management
- 29:58Conclusion and best practices
related talks
43mDeep Dive: Apps SIG
01h 27mTutorial: How To Write a Reconciler Using K8s Controller-Runtime!
55mIntroduction to Kubernetes Operators
27mDemystifying Why the World Is Built on Kubernetes: Learning To Leverage Bespoke CRDs and Controllers
24mWriting kube controllers for everyone
46mOperators Live in the Past: Designing Reliable Kubernetes Controllers
35mBeyond Reconcile Loop - Patterns for Kubernetes Operator Development
32mDon't Write Controllers Like Charlie Don't Does: Avoiding Common Kubernetes Controller Mistakes
