Last Updated: November 21, 2025
Operator Architecture
kubectl get crd
List custom resource definitions
operator-sdk init --domain example.com
Bootstrap an operator scaffold
kubectl apply -f deploy/crds
Install CRDs before controller
Reconciliation Loop
Observe current state, compare with desired spec, mutate live resources, and update status before repeating.
Best Practices
| Pattern | Why it matters |
|---|---|
Leader election
|
Protect against dual controllers |
Status subresource
|
Avoid write conflicts with spec |
Rate limiting
|
Prevent API server thrashing |
💡 Pro Tip:
Test reconciliation by simulating failure events and confirming idempotent healing.