Interview › Kubernetes, Docker, Helm & Podman
What is a CRD (Custom Resource Definition), and what is an Operator?
Kubernetes, Docker, Helm & Podman · Intermediate level
Answer
A CRD extends the Kubernetes API with a custom resource type. An Operator is a controller that watches those custom resources and reconciles real infrastructure or application state to match the custom resource spec.
Technical explanation
CRDs make custom resources first-class API objects with schema, versions, validation, and kubectl support.
Operators turn operational knowledge into controllers, for example database failover, backups, certificate issuance, or app upgrades.
Kubernetes internals follow a watch-and-reconcile model over API objects stored in etcd.
Extending Kubernetes safely requires schema validation, idempotent controllers, finalizers, ownership, and observable status conditions.
Backup and restore procedures are part of the control-plane design, not an afterthought.
Hands-on example
1. Use a disposable kubeadm or kind-based lab for this exercise: create a simple CRD and a small controller/operator example. Do not practice destructive control-plane work on production.
2. Inspect API objects and controller behavior with kubectl get -w, events, status fields, and logs from the relevant controller.
3. For backup/restore topics, create a snapshot, restore into a separate environment, and verify objects and workloads after recovery.
4. Document the failure scenario, recovery steps, and validation commands.
Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Kubernetes, Docker, Helm & Podman interview questions
- What is etcd, and why is it critical to back it up?
- What is a sidecar container, and give a common use case?
- How do you troubleshoot an ImagePullBackOff error?
- What is a static Pod, and how does it differ from a normally scheduled Pod?
- What are Pod topology spread constraints, and why use them?
- How do you view logs from a crashed (previous) container instance?
- What is a PodDisruptionBudget, and how does it protect availability during maintenance?
- What is graceful termination, and how do preStop hooks and terminationGracePeriodSeconds work?