How do you write a minimal controller or choose between operator frameworks?
AdvancedScenarioHelm, operators and GitOps
Answer
Situation read → The team needs a custom operator for an internal resource.
What I'd do →
- Consider if a Helm chart or a CronJob is enough first
- Use Kubebuilder or Operator SDK (Go) for full control, or Kopf (Python) for simple needs
- Define the CRD schema with validation and a status subresource
- Make reconciliation idempotent
- Add finalizers for cleanup, metrics and leader election
Why → Reconcile loops must be level-triggered and idempotent.
Interview tip → Mention status conditions.
More on Helm, operators and GitOps
A `helm upgrade` failed halfway. How do you see state and recover?BeginnerHelm says `cannot re-use a name that is still in use` or `another operation is in progress`. What now?IntermediateHow do you review what a Helm upgrade will change before running it?IntermediateWhere do you keep chart values for multiple environments?BeginnerWhat does `helm template` do and how is it different from `helm install`?BeginnerA Helm chart upgrade changed an immutable field and failed. How do you proceed?Advanced