What is the Kubernetes operator pattern, and how does a custom controller's reconcile loop actually work?

technical-conceptual · Mid level · cloud-devops-security

What the interviewer is really asking

Assess whether the candidate understands an operator as a CRD plus a controller that runs a level-triggered reconcile loop, and can describe the watch/cache/workqueue mechanics and idempotency requirement rather than reciting 'it automates ops'.

What to say

What to avoid

Example answers

Strong: We had a stateful database that needed careful manual steps for failover and backups, so I wrote an operator. The CRD let teams declare a 'PostgresCluster' with replica count and backup schedule, and the controller's reconcile loop compared that spec to the live StatefulSet, PVCs, and CronJobs and created or adjusted whatever was missing. Because it was level-triggered and idempotent, a controller restart just re-reconciled to the same desired state instead of redoing actions.

Weak: An operator is basically a Helm chart that installs an app with some custom settings.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.