Extending Kubernetes with CustomResouceDefinition
summary
Shows how to extend Kubernetes with a CustomResourceDefinition for sensors and a small controller/operator that watches those JSON objects, created via kubectl create -f sensor, and reacts (PATCH/UPDATE/DELETE) to emit events and call external services. Uses client-go informers and local caches to avoid hot polling, handles optimistic-patch conflicts with retries (few-second backoff), and demonstrates a working sample controller. Notes scaling limits across many namespaces/clusters and edge cases where retries or long reconcile loops cause missed updates.
AI-written summary · about
chapters (10)
- 0:00Introduction to Custom Resources
- 3:13What is a CustomResourceDefinition
- 7:17Use case with temperature sensors
- 13:13Creating and managing custom resources
- 18:13Defining resource properties
- 22:20Controllers and operators
- 26:16Event handling in controllers
- 30:16Best practices for controllers
- 33:14Compliance and policies
- 35:29Summary and closing
related talks
40mExtending K8s- Introducing Custom Resources, Controllers, Operators & Schedulers
38mKubernetes Beyond
32mKubernetes Feature Prototyping with External Controllers and Custom Resource Definitions
36mBuilding a Fault-Tolerant Resources Controller on Kubernetes
39mWriting a Kubernetes/Openshift Operators Using Golang
06mExtending the Kubernetes API
26mExtending Kubernetes with Custom Controllers
39mBuilding Distributed Systems with Kubernetes
