Kubernetes Operator Interview Prep: 6-Week Plan (2027)

A six-week Kubernetes Operator interview study plan: CRDs, reconcile loops, Kubebuilder, finalizers, envtest, OLM, plus 32 self-check questions.

Sep 27, 2025 - 15:40
Nov 10, 2026 - 19:37
 0  97
Kubernetes Operator Interview Prep: 6-Week Plan (2027)

To prepare for a Kubernetes Operator interview, spend about six weeks moving from API basics to a working operator: custom resources and CRDs, the controller and reconcile loop, Kubebuilder or Operator SDK, status and finalizers, testing with envtest, then packaging with OLM and operating it in production. This plan gives a weekly schedule, labs and 32 self-check questions.

If you want a large question bank instead of a plan, use our 75+ Kubernetes Operators interview questions. This page is the study roadmap: what to learn each week, what to build, and how to check you are ready. It assumes you already know core Kubernetes objects; if not, start with Kubernetes architecture components.

Key takeaways

  • Operator interviews test three things: Kubernetes API knowledge, controller design (level-triggered, idempotent reconcile), and hands-on Go with controller-runtime.
  • Build one real operator end to end. Interviewers ask about your design choices more than definitions.
  • Kubebuilder and Operator SDK both build on controller-runtime. Operator SDK adds OLM integration, scorecard tests and Helm and Ansible operator types.
  • Know status conditions, finalizers, owner references, the status subresource and why you never block inside Reconcile.
  • Production topics separate senior candidates: RBAC scoping, leader election, webhooks, CRD versioning and upgrades, and metrics.

Who this plan is for

Your backgroundPlan lengthWhere to spend extra time
Kubernetes admin, little Go6 to 8 weeksWeek 1 Go basics, week 3 Reconcile code
Go developer, new to Kubernetes6 weeksWeek 1 API machinery, week 2 controllers
Platform engineer who has used operators3 to 4 weeksWeeks 4 to 6: testing, OLM, production design

Plan five to eight hours a week. Each week ends with a lab and a short self-test from the question section below.

The six-week study plan

Week 1: the Kubernetes API and Go foundations

  • Learn how the API server stores objects in etcd, what Group, Version, Kind and Resource mean, and how kubectl api-resources and kubectl explain expose them.
  • Understand metadata, spec and status, resourceVersion and optimistic concurrency, labels, annotations and owner references.
  • Go basics if needed: structs, interfaces, error handling, contexts and modules.
  • Read the Kubernetes docs pages on the operator pattern and custom resources.

Lab: write a CRD by hand, apply it, create custom objects, and use kubectl get with additional printer columns.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: backups.demo.example.com
spec:
  group: demo.example.com
  scope: Namespaced
  names:
    kind: Backup
    plural: backups
    singular: backup
  versions:
    - name: v1alpha1
      served: true
      storage: true
      subresources:
        status: {}
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required: ["schedule"]
              properties:
                schedule:
                  type: string
                retention:
                  type: integer
                  minimum: 1

Week 2: controllers and the reconcile loop

  • Learn informers, listers, caches and work queues, and why controllers are level-triggered: they compare desired and actual state instead of reacting to individual events.
  • Study how controller-runtime wraps this in a Manager, Controllers and a Reconcile(ctx, req) function.
  • Learn the return values: an error (requeue with backoff), Requeue and RequeueAfter (scheduled requeue), or an empty result (done).
  • Read the source of one built-in controller, such as the Deployment or Job controller, at a high level.

Lab: follow the Kubebuilder quick start and run the generated controller locally against a kind cluster with make run.

Week 3: build your first operator

  • Scaffold with kubebuilder init and kubebuilder create api, or operator-sdk init and operator-sdk create api.
  • Define the API types in Go with validation markers such as +kubebuilder:validation:Minimum, then generate CRDs with make manifests.
  • Write Reconcile to create a Deployment and Service for each custom resource, using controllerutil.SetControllerReference so children are garbage collected.
  • Use Owns() so changes to child objects trigger reconciliation of the parent.
func (r *AppReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
    var app demov1.App
    if err := r.Get(ctx, req.NamespacedName, &app); err != nil {
        return ctrl.Result{}, client.IgnoreNotFound(err)
    }

    deploy := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: app.Name, Namespace: app.Namespace}}
    _, err := controllerutil.CreateOrUpdate(ctx, r.Client, deploy, func() error {
        deploy.Spec.Replicas = &app.Spec.Replicas
        // set selector, template and labels here
        return controllerutil.SetControllerReference(&app, deploy, r.Scheme)
    })
    if err != nil {
        return ctrl.Result{}, err
    }
    return ctrl.Result{}, nil
}

Lab: deploy the operator to kind with make docker-build deploy, scale the custom resource and delete a child Deployment to watch the operator recreate it.

Week 4: status, finalizers, events and RBAC

  • Write status through the status subresource (r.Status().Update), set observedGeneration, and use standard metav1.Condition entries such as Ready and Degraded.
  • Add a finalizer for external cleanup (for example deleting a cloud bucket), and remove it only after cleanup succeeds.
  • Emit Kubernetes events with an event recorder for user-visible progress.
  • Generate RBAC with +kubebuilder:rbac markers and keep it least privilege; know the difference between namespaced and cluster-scoped permissions.

Lab: add a Ready condition and a finalizer, then delete the custom resource and confirm cleanup runs before the object disappears.

Week 5: testing, webhooks and versioning

  • Test Reconcile with envtest, which starts a real API server and etcd without kubelets, using Ginkgo and Gomega as Kubebuilder scaffolds do.
  • Add defaulting and validating admission webhooks, and learn about CEL validation rules (x-kubernetes-validations) in CRDs as a lighter alternative for many checks.
  • Add a second API version, mark one as the storage version, and write a conversion webhook (hub and spoke model in Kubebuilder).
  • Run end-to-end tests on kind in CI.

Lab: write envtest cases for create, update and delete, and add a CEL rule that rejects invalid field combinations.

Week 6: packaging, OLM and production operations

  • Learn Operator Lifecycle Manager: bundles, ClusterServiceVersions, catalogs and channels, and how operator-sdk run bundle installs a bundle for testing. Read about OLM v1 as well, since the project has a newer generation.
  • Learn the Operator SDK capability levels: Basic Install, Seamless Upgrades, Full Lifecycle, Deep Insights and Auto Pilot.
  • Production concerns: leader election for multiple replicas, metrics exposed by controller-runtime for Prometheus, rate limiting, MaxConcurrentReconciles, cache scoping to namespaces, and upgrade testing.
  • Review well-known operators such as Prometheus Operator, cert-manager or CloudNativePG to see real design choices.

Lab: build an OLM bundle with make bundle, run the scorecard with operator-sdk scorecard, and install it on a cluster with OLM.

Weekly checklist

WeekTopicProof you are done
1API and CRDsHand-written CRD with schema validation and status subresource
2ControllersExplain level-triggered reconcile and requeue options without notes
3First operatorOperator recreates deleted children and scales on spec change
4Status, finalizers, RBACReady condition, working finalizer, least-privilege ClusterRole
5Testing and versioningPassing envtest suite and a second API version
6OLM and productionBundle installs through OLM; metrics scraped by Prometheus

Self-check questions

Answer each one aloud before reading the answer. When you can do all 32 comfortably, you are ready for most operator rounds.

Fundamentals (freshers and career switchers)

1. What is a Kubernetes Operator?

A custom controller that uses custom resources to manage an application and automate operational tasks, such as installing, upgrading, backing up and recovering it, in the way a human operator would.

2. What is the difference between a CRD and a custom resource?

A CustomResourceDefinition registers a new type with the API server. A custom resource is an object of that type, such as one Backup.

3. What does level-triggered mean for a controller?

The controller acts on the current state, not on the event that woke it. If events are missed or merged, the next reconcile still drives the system to the desired state.

4. Why must Reconcile be idempotent?

It can run many times for the same object, after restarts, resyncs or child changes. Running it twice must give the same result as running it once.

5. What is the status subresource?

A separate endpoint for the status field. Users update spec and the controller updates status, and spec changes increment metadata.generation while status changes do not.

6. What are owner references used for?

They link child objects to a parent so the garbage collector deletes children when the parent is deleted, and so controller-runtime can map child events back to the parent.

7. What is the relationship between Kubebuilder, Operator SDK and controller-runtime?

controller-runtime is the Go library. Kubebuilder scaffolds projects using it. Operator SDK uses Kubebuilder's scaffolding for Go operators and adds OLM, scorecard, and Helm and Ansible operator support.

8. When is a Helm chart enough and when do you need an operator?

Helm handles install and upgrade templating. An operator is worth it when the application needs ongoing actions: failover, backups, scaling based on application state, or ordered upgrades.

Intermediate (2 to 5 years)

9. What should Reconcile return when an external API is temporarily down?

Return the error so controller-runtime requeues with exponential backoff, and set a status condition explaining the problem. Do not sleep inside Reconcile.

10. When do you use RequeueAfter?

For time-based work, such as checking a backup schedule or polling an external system that has no events. It schedules the next reconcile without signalling an error.

11. How does a finalizer work?

The controller adds a finalizer string to the object. On delete, the API server sets deletionTimestamp but keeps the object until all finalizers are removed. The controller runs cleanup, then removes its finalizer.

12. What happens if your finalizer cleanup always fails?

The object stays in Terminating forever. Surface the error in status and events, and document how to remove the finalizer manually after checking the external resource.

13. What is observedGeneration?

A status field the controller sets to the metadata.generation it last processed. Clients compare the two to know whether status reflects the latest spec.

14. How do you watch resources your operator does not own?

Use Watches() with a handler that maps events to the custom resources that care, for example mapping a Secret change to every App referencing it.

15. How do you avoid update conflicts?

Fetch the latest object before changing it, use patch instead of full update where possible, and on a conflict error return and let the next reconcile retry with a fresh copy.

16. Why use predicates?

To filter events, for example ignoring status-only updates with GenerationChangedPredicate, so the controller does not reconcile in a loop after writing its own status.

17. What is envtest?

A package that runs a real kube-apiserver and etcd binary for tests, without nodes. It lets you test Reconcile against real API behaviour faster than a full cluster.

18. What are CEL validation rules in CRDs?

Expressions in x-kubernetes-validations that the API server evaluates on create and update, such as "minReplicas must be less than maxReplicas". They remove the need for a webhook in many cases.

19. How do you generate RBAC for an operator?

With +kubebuilder:rbac markers on the controller, which make manifests turns into a ClusterRole. Request only the verbs and resources the code uses.

20. How do you expose operator metrics?

controller-runtime serves Prometheus metrics, including reconcile counts, errors and durations. Add custom metrics with the controller-runtime metrics registry and scrape them with a ServiceMonitor.

Senior and architect

21. How do you run several replicas of an operator safely?

Enable leader election in the Manager so only one replica reconciles at a time while others stand by.

22. How do you version a CRD API?

Serve multiple versions, mark exactly one as the storage version, and provide a conversion webhook when the schemas differ. Migrate stored objects before removing an old version.

23. What is OLM and why use it?

Operator Lifecycle Manager installs, upgrades and manages operators on a cluster from catalogs, handling dependencies, channels and RBAC. OpenShift uses it for OperatorHub.

24. What are the Operator SDK capability levels?

Level 1 Basic Install, level 2 Seamless Upgrades, level 3 Full Lifecycle, level 4 Deep Insights, level 5 Auto Pilot. They describe how much operational work an operator automates.

25. How do you scope an operator to some namespaces?

Configure the Manager cache to watch only specific namespaces and grant Roles instead of ClusterRoles where possible. This reduces memory use and blast radius.

26. How do you handle large numbers of custom resources?

Raise MaxConcurrentReconciles carefully, keep Reconcile fast, use predicates, cache only needed fields or types, and watch API server request rates and work queue depth metrics.

27. How do you design an operator for a stateful database?

Model clusters, backups and restores as separate custom resources, use StatefulSets or direct Pod management, implement ordered failover and upgrades, report health in conditions, and test failure cases. Study existing operators such as CloudNativePG before writing your own.

Scenario drills

28. Your operator updates status and then reconciles again in an endless loop.

Status writes trigger watch events. Add GenerationChangedPredicate or compare status before writing so you only update when something changed.

29. Custom resources stay in Terminating.

A finalizer is not removed. Check operator logs for cleanup errors, confirm the operator is running, and only remove the finalizer by hand after verifying the external resource is gone.

30. After upgrading the operator, old objects fail validation.

The new schema is stricter or the version changed without conversion. Add a conversion webhook or defaulting, and test upgrades with existing objects before release.

31. The operator gets "forbidden" errors on Secrets.

RBAC is missing a verb or resource. Add the correct +kubebuilder:rbac marker, regenerate manifests and redeploy.

32. Reconcile takes minutes because it waits for a job.

Start the job, record progress in status, and return with RequeueAfter or watch the Job so its completion triggers the next reconcile.

After the plan

Work through the scenario-based Kubernetes Operator questions and the real-time operator questions for more incident practice. If you are new to the topic, the most asked Kubernetes Operator questions cover basics, and the guide to useful Kubernetes CRDs shows real custom resources in use.

Operator work builds on application developer skills. Our CKAD training covers the Kubernetes objects and API usage operators depend on, in Kharadi, Pune and live online.

FAQ

How long does it take to prepare for a Kubernetes Operator interview?

About six weeks at five to eight hours a week if you know Kubernetes basics. Experienced platform engineers can compress it to three or four weeks.

Do I need Go to work on operators?

Most production operators are written in Go with controller-runtime, so yes for developer roles. Operator SDK also supports Helm and Ansible operators for simpler cases.

Kubebuilder or Operator SDK: which should I learn?

Learn Kubebuilder concepts first, because Operator SDK uses its scaffolding for Go. Learn Operator SDK commands if the role involves OLM or OpenShift.

Is there a certification for Kubernetes Operators?

There is no CNCF certification specific to operators. CKAD and CKA cover the Kubernetes knowledge operators depend on.

What project should I build for my portfolio?

An operator that manages a small stateful app or an external resource, with status conditions, a finalizer, envtest tests and an OLM bundle. Put it on GitHub with a clear README.

What do interviewers ask most about operators?

Reconcile design, idempotency, finalizers, status conditions, owner references, RBAC and how you test and upgrade the operator.

Official references

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.