Stage 9, Part 8 of 9, Cluster Extensibility (CRDs, Controllers, Operators)

Text

PART 8: INTERVIEW PREPARATION

35. Junior-Level Questions

QuestionExpected Answer
What is a CRD?Custom Resource Definition — extends the API
What is a controller?Control loop that reconciles desired vs actual state
What is an operator?Controller with domain-specific knowledge
What is a webhook?Admission callback
What is a finalizer?Prevents deletion until cleanup

36. Mid-Level Questions

QuestionExpected Answer
What is the watch-queue-reconcile pattern?Informer → WorkQueue → Reconciler
What is the difference between validating and mutating webhooks?Mutating modifies; validating allows/denies
What is the hub-and-spoke pattern?One version is hub; others convert to/from it
What is Server-Side Apply?Field-level ownership, managedFields
What is OLM?Operator Lifecycle Manager

37. Senior-Level Questions

QuestionExpected Answer
How do you make an operator idempotent?Level-triggered, SSA, status subresource
How do you test an operator?envtest, KUTTL, fuzzing
How do you handle CRD versioning?Multiple versions, conversion webhook, hub-and-spoke
What is the webhook failure policy?Fail (reject) or Ignore (allow)
When should you use CEL vs webhook?CEL for in-process; webhook for external

38. Staff/Principal Questions

QuestionExpected Answer
Design a multi-tenant operator platform.OLM, RBAC, NetworkPolicy, resource quotas
How do you migrate CRD versions safely?Test conversion, backup, rollback plan
How do you secure operators?Least privilege RBAC, non-root, NetworkPolicy
How do you monitor operators?Prometheus metrics, structured logs, tracing
When should you NOT build an operator?Simple stateless apps, one-time setup

1:1 copy of the class Google Doc, code in code blocks.