operator pattern
Packaging operational knowledge as a custom resource plus a controller that reconciles it, so software manages itself on Kubernetes.
In more detail
The custom resource records what the user wants and the controller creates or updates the owned objects to match, then reports conditions in status. The reconcile step must be idempotent so running it twice is harmless. Owner references, finalizers and narrowly scoped RBAC make the loop safe to operate.
Related terms
- CRD — A CustomResourceDefinition: an object that teaches the API server a new kind, with its own name, group, scope and schema.
- custom resource — An object of a kind that a CRD added to the cluster, such as a Website object from a platform team's own CRD, used to record intent for a controller.
- reconciliation — The repeated check-and-fix loop in which a program compares desired state with observed state and changes the world to match.
- owner reference — A field in an object's metadata naming the object that owns it, such as the ReplicaSet that owns a pod.
- finalizer — A marker on an object that makes Kubernetes wait, after a delete request, until a controller has finished cleanup and removed the marker.
Taught in
- CNI, CSI, CRI And CRDs: The Plug-In Points — Certified Kubernetes Administrator (CKA) Exam Prep
- Gateway API: A Route Asks, A Gateway Allows — Certified Kubernetes Administrator (CKA) Exam Prep
- Placing Pods: Selectors, Affinity, Taints And Requests — Certified Kubernetes Administrator (CKA) Exam Prep
- Troubleshooting: ImagePullBackOff And Failed Rollouts — Kubernetes: Production-Grade Container Orchestration
- NetworkPolicy And The Consul Service Mesh Boundary — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: Forbidden Requests And Admission Rejections — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: A Timed Service Recovery Drill — Kubernetes: Production-Grade Container Orchestration
- Package The Service As A Helm Chart — Kubernetes: Production-Grade Container Orchestration
- Argo CD Applications And Flux Reconciliation — Kubernetes: Production-Grade Container Orchestration
- A Tiny CRD, Controller And The Operator Pattern — Kubernetes: Production-Grade Container Orchestration