Who Let the Pods Out? Extending Kubernetes with Custom Controllers and CRDs
summary
A Go controller watches Deployments with the label auto service=true and automatically creates or deletes a matching Service (name = deployment name + "-internal-service"), moving from a brittle 30s polling bash script to a resilient loop using client-go informers, a deduplicating workqueue, and retries; it runs in-cluster with in‑cluster config and service account, adds resyncs for drift, exposes metrics/logs for observability, and the pattern is ready to be scaffolded by kube-builder.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 2:32Kubernetes needs custom controllers
- 5:43How controllers work
- 8:12Kubernetes API server
- 10:00Custom Resource Definitions
- 14:16Client-go library
- 16:03Building a controller
- 18:09Using informers
- 20:38Work queues for resilience
- 22:48Reconciliation logic
- 25:14Deploying the controller
- 26:59Production best practices
- 28:42Controllers to operators
- 29:04Q&A
related talks
32mKubernetes as a platform for platforms
36mLet's Build Kubernetes, With a Spreadsheet and Volunteers!
33mKubernetes Deconstructed: Understanding Kubernetes by Breaking It Down
35mPlanes, Raft, and Pods: A Tour of Distributed Systems Within Kubernetes [B]
29mA Staging Environment Per Pull Request: Building Our Own Controller!
38mThe Elements of Kubernetes - Foundational Concepts for Apps Running on Kubernetes
26mThe Control Loop As An Application Development Framework
32mKubernetes Namespaces Unleashed: Unlocking the Full Potential of You...
