Writing Kubernetes Controllers for CRDs: Challenges, Approaches and Solutions
summary
Live demo builds a CRD called Cluster plus controllers that actually provision and delete Kubernetes clusters on AWS using Rancher’s rke and a client code generator to produce listers/informers. Controller logic uses status conditions (multiple conditions, true = good), ownerReferences for garbage collection, and a finalizers pre-delete hook; it checks spec changes with observedGeneration instead of reacting to any update. Demo provisions and cleans up a cluster (kubeconfig creation flaps), and recommendations emphasize idempotent sync, labels vs annotations, and using the status subresource where available.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:24Kubernetes Ecosystem
- 1:37Custom Resources
- 2:26What makes a custom resource
- 3:23Lets build...
- 3:49Things we are going to demo
- 4:25Tools used
- 19:25Be careful with update logic
- 20:15Conditions
- 20:36Finalizer
- 20:59Owner reference
related talks
34mExtending Kubernetes 101
29mKubernetes Custom Resources with Kubeless and Metacontroller
27mDemystifying Why the World Is Built on Kubernetes: Learning To Leverage Bespoke CRDs and Controllers
48mKubernetes as backend: CRD & Operators
29mKubernetes Operator For Deployment And Management Of App
29mKubernetes Reloaded AKA How to Avoid the Dev Plateau with CRDs
19mKeynote: CRDs, No Longer 2nd Class Thing!
38mTo Crd, or Not to Crd, That is the Question
