Real-Time Kubernetes Operator Interview Questions (2027)

28 real-time Kubernetes Operator interview questions: hot loops, stuck finalizers, cache reads, RBAC, webhooks, CRD versioning and leader election.

Sep 27, 2025 - 12:53
Nov 10, 2026 - 11:29
 0  58
TOPICInterview Q & APractical guide
Real-Time Kubernetes Operator Interview Questions (2027)

Real-time Kubernetes Operator interview questions describe a controller misbehaving in production and ask how you would find the cause: a reconcile loop that never stops, a custom resource that cannot be deleted because of a finalizer, a status that never updates, a webhook that blocks the whole cluster, or an upgrade that breaks stored CRD versions. You need to reason about reconciliation, caches, ownership and RBAC.

This page is for engineers who build or run Operators. For a study plan start with the Kubernetes Operator interview preparation guide. Facts were checked against the Kubernetes, Kubebuilder, controller-runtime and Operator SDK documentation in November 2026. The latest Operator SDK release on its GitHub page at that time was v1.42.3.

Key takeaways

  • A controller compares desired state in the spec with actual state and acts to close the gap. Reconcile must be idempotent because it runs many times for the same object.
  • Most production bugs are hot loops, stuck finalizers, missing RBAC, stale cache reads and status written in a way that triggers another reconcile.
  • Owner references give garbage collection and let changes to child objects requeue the parent.
  • Admission webhooks with a failure policy of Fail can block API requests if the webhook is down. Scope them carefully.
  • CRD versioning needs a storage version, conversion and a plan to migrate stored objects before removing an old version.
  • Leader election, metrics and structured logs are what you check first when an Operator acts strangely.

Quick map: symptom to first check

SymptomFirst checkUsual cause
CPU high, logs floodReconcile count metric and logsStatus update or child update retriggers reconcile
Object stuck Terminatingmetadata.finalizersCleanup failing or controller not running
"forbidden" in logsRole and ClusterRole of the managerMissing RBAC marker or verb
Changes ignoredWatches and predicatesChild type not watched or filtered out
All creates fail cluster-wideWebhook configurationWebhook down with failurePolicy Fail

Reconciliation in production

1. Your Operator's CPU is high and logs show the same object reconciling hundreds of times a minute. Why?

Something keeps changing the object or its children, which triggers a new event each time. Common causes: updating status with a timestamp on every pass, writing the whole object back when nothing changed, or updating a child with defaulted fields that differ from what you sent. Compare before writing, use GenerationChangedPredicate where spec changes are what matter, and update status only when it really changes.

2. Why must Reconcile be idempotent?

The controller can run it for many reasons: restarts, resyncs, child events, retries after errors. If running it twice creates two databases or sends two emails, the design is broken. Always look up existing resources first and create only what is missing.

3. When do you return an error and when do you requeue after a delay?

Return an error for unexpected failures so controller-runtime retries with exponential backoff. Return RequeueAfter when you are waiting on something external, such as a cloud resource becoming ready, and polling at a fixed interval is reasonable.

4. The controller reads an object right after creating it and gets not found. Why?

The default client reads from the informer cache, which is updated asynchronously from the watch. Do not rely on read-after-write. Trust the next reconcile, or read through an API reader when you truly need a fresh value.

5. What does observedGeneration in status tell you?

metadata.generation increases when the spec changes. Writing the generation you acted on into status.observedGeneration lets users and tools know whether the status reflects the latest spec.

6. How should status conditions be written?

Use the standard metav1.Condition type with type, status, reason, message and lastTransitionTime. Use a clear Ready or Available condition so tools like kubectl wait can use it.

Finalizers and deletion

7. A custom resource is stuck in Terminating. What do you check?

Look at metadata.finalizers and deletionTimestamp. The controller is expected to clean up and remove its finalizer. If the controller is not running, or the cleanup keeps failing, the object stays. Check controller logs for the cleanup error.

8. Is it safe to remove a finalizer by hand?

Only when you know the external cleanup is done or not needed. Removing it with a patch lets the object go, but any cloud resource the finalizer protected may be orphaned. Document the reason and clean up manually.

9. How do you implement a finalizer correctly?

Add it when the object is created. When deletionTimestamp is set, perform cleanup, and only after success remove the finalizer with an update. Make cleanup idempotent so a retry after partial success is safe.

10. Child Deployments are left behind after the parent is deleted. Why?

The children have no owner reference to the parent. Set it with controllerutil.SetControllerReference so the garbage collector deletes them. Owner references must be in the same namespace, or the owner must be cluster-scoped.

Watches, caches and RBAC

11. Someone edits a child ConfigMap and the Operator does not correct it. Why?

The controller probably does not watch ConfigMaps. Add Owns(&corev1.ConfigMap{}) in the controller setup so events on owned ConfigMaps requeue the parent. Also check that predicates are not filtering the event out.

12. The Operator logs "forbidden" when listing Secrets. What do you fix?

The manager's ServiceAccount lacks permission. Add a +kubebuilder:rbac marker with the group, resource and verbs, regenerate the manifests with make manifests, and redeploy. Grant only the verbs you need.

13. Memory keeps growing in a large cluster. What could cause it?

The cache holds every object of each watched type across all namespaces. Watching Secrets or Pods cluster-wide is expensive. Restrict the cache to namespaces you need, use label selectors for cached types, or use metadata-only watches when you do not need full objects.

14. How does an Operator handle a resource in another namespace?

Cross-namespace owner references are not allowed, so you cannot rely on garbage collection. Use labels or annotations to map back to the parent, add a custom watch handler that enqueues the parent, and clean up with a finalizer.

Webhooks

15. After installing an Operator, every Pod create in the cluster fails. What happened?

A mutating or validating webhook with failurePolicy: Fail matches Pods and its service is unreachable. Check the webhook configurations and the webhook pod. Fix by scoping the webhook with a namespace or object selector, and only use Fail where blocking is truly needed.

16. The webhook fails with a certificate error. What do you check?

The caBundle in the webhook configuration must match the serving certificate. Projects scaffolded by Kubebuilder often use cert-manager to inject it. Check the certificate is issued, not expired and that the CA injection annotation is present.

17. Validation or defaulting: webhook or CRD schema?

Use the OpenAPI schema and CEL validation rules in the CRD (x-kubernetes-validations) for field checks, since they run in the API server with no extra service. Use webhooks only when you need logic that CEL cannot express, such as calling another service.

CRD versions and upgrades

18. You need to rename a field in your CRD. How do you do it safely?

Add a new API version with the new field, keep one storage version, and add a conversion webhook so the API server can convert between versions. Keep serving the old version until clients have moved.

19. Can you remove an old CRD version right away?

No. Objects may still be stored in that version in etcd. Migrate stored objects to the new storage version, confirm status.storedVersions on the CRD lists only the new one, then stop serving and remove the old version.

20. How do you upgrade an Operator with zero downtime for the managed apps?

The workloads keep running while the controller pod restarts, because the Operator only manages them. Test the new version against existing custom resources in staging, check that reconcile does not trigger unwanted rolling restarts of children, and use OLM upgrade channels if you distribute through OLM.

Running Operators

21. Two Operator replicas are both making changes. Why?

Leader election is disabled or misconfigured. Enable it so only one replica runs controllers. Check the Lease object in the Operator's namespace to see who holds leadership.

22. Which metrics do you check first?

controller-runtime exposes metrics such as controller_runtime_reconcile_total, controller_runtime_reconcile_errors_total and reconcile duration histograms, plus workqueue depth. A growing queue or error count tells you where to look.

23. How do you test an Operator before production?

Unit test logic, then use envtest to run Reconcile against a real API server and etcd without a full cluster. Finish with end-to-end tests on a kind cluster, including upgrade and deletion paths.

24. What does OLM add when you ship an Operator?

Operator Lifecycle Manager installs Operators from catalogs, manages upgrades through channels and checks dependencies. You package the Operator as a bundle with a ClusterServiceVersion.

Design scenarios

25. You must manage a database cluster with backups. How do you design the Operator?

Define a Database resource for the cluster and a separate Backup resource for each backup run, so status and history stay clear. Use a StatefulSet for members, handle failover in reconcile, report health in conditions and protect data with a finalizer that checks a final backup policy.

26. When should you not build an Operator?

When a Helm chart or plain manifests do the job and there is no ongoing operational logic. An Operator is code that must be maintained, tested and secured.

27. Go Operator, Helm-based Operator or Ansible-based Operator?

Operator SDK supports all three. Helm-based suits install and upgrade only. Ansible-based suits teams with Ansible skills. Go gives full control for complex lifecycle logic like failover and backups.

28. How do you explain a hot loop fix in an interview?

Describe how you found it (reconcile metrics and logs), the cause (a status timestamp written each pass), the fix (write status only on change and filter events with a predicate) and the check (reconcile rate dropped back to normal).

Related reading and practice

For more practice, try the scenario-based Operator questions, the most asked Operator questions and advanced Operator questions. The concept is explained in how Operators automate stateful applications. Strong Kubernetes API skills are the base for all of this, and our CKAD training runs in Kharadi, Pune and live online across India.

Frequently asked questions

What is a reconcile loop?

It is the function a controller runs for each object to compare the desired state in the spec with the actual state and act to close the gap. It runs repeatedly and must be idempotent.

Why is my custom resource stuck in Terminating?

A finalizer is still on the object. The controller must finish cleanup and remove it. Check whether the controller is running and why the cleanup is failing.

What causes an Operator hot loop?

Updates that change the object or its children on every pass, such as writing a timestamp to status, which triggers another event and another reconcile.

Kubebuilder or Operator SDK?

Both scaffold Go Operators on controller-runtime, and Operator SDK builds on Kubebuilder. Operator SDK adds Helm and Ansible Operator types and OLM integration.

How do I test an Operator without a cluster?

Use envtest, which starts a local API server and etcd so you can run Reconcile against real API behaviour.

How do I remove an old CRD version?

Migrate stored objects to the new storage version, confirm status.storedVersions lists only it, then stop serving and remove the old version.

Official references

Interested in learning more?Get a callback from our training advisors.

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.