Kubernetes interview question · Most asked
What are Custom Resource Definitions and operators?
Summary
A CRD adds a new resource type to the Kubernetes API (for example PostgresCluster or Certificate). An operator is a controller that watches those custom resources and reconciles real systems to match them, encoding operational knowledge such as provisioning, failover, backups and upgrades.
Longer Answer
Examples: cert-manager (Certificate to TLS secrets via ACME), CloudNativePG, the Prometheus Operator, Argo CD, Crossplane (cloud resources as Kubernetes objects). Operators are usually built with Kubebuilder or Operator SDK (Go), or frameworks in other languages.
Evaluate third-party operators like any critical dependency: maintenance activity, upgrade path, RBAC permissions they require, and what happens to your resources if the operator is removed.
Key Points
- CRDs extend the API.
- Operators reconcile custom resources.
- Encode operations knowledge.
- Evaluate permissions and maintenance.
More most-asked Kubernetes questions
- ConfigMaps and Secrets: how do they differ, and how should secrets really be handled?
- How does the scheduler place pods? Explain resource requests, node affinity, taints and tolerations.
- Describe the Kubernetes architecture: what runs on the control plane and what runs on the nodes?
- How do rolling updates work in a Deployment, and how do you roll back?
- Explain the Service types: ClusterIP, NodePort, LoadBalancer, ExternalName and headless.
- What happens, step by step, when you run kubectl apply for a Deployment?
- Deployment, StatefulSet, DaemonSet, Job and CronJob: when do you use each?
- What is the difference between resource requests and limits, and what are the QoS classes?