Kubernetes Operators
Kubernetes Operators extend the platform's control loop to manage complex, stateful applications automatically. They encode operational knowledge — installation, scaling, backup, upgrades — in custom controllers that reconcile desired state declared in custom resources.
itCloud native tools and technologies | OpenSkills.info
Recommended first:kubernetes-fundamentals
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic: Kubernetes Operators
A Kubernetes Operator is a small resident bureaucrat for one particular application. It lives in the cluster, receives a custom resource that says what the application should look like, and keeps trying to make reality agree. This is useful because a database is not merely three Pods with storage. It also has replication, backups, upgrades, failover, and several opportunities to become interesting at an inconvenient time.
The trick is the pairing of a custom resource and a custom controller. The resource gives the application a vocabulary such as a database cluster, replicas, or a backup. The controller understands that vocabulary and performs the work. Kubernetes already does this for its own objects. An operator lets an application borrow the same arrangement instead of leaving a human to translate a runbook at speed.
The surprising bit is that the resource does nothing by itself. A CRD registers a type with the API server and gives it YAML, RBAC, watches, and the usual Kubernetes furniture. Without a controller, it is an impeccably stored declaration with nowhere to go. With a controller, a change to spec becomes a continuing reconciliation attempt, not a one-time command. That is why editing a child StatefulSet rarely sticks: the controller regards the custom resource as the source of truth and returns with a clipboard.
Reliable operators are built around reconciliation, checking the whole observed state and nudging it toward the request. The loop tolerates retries and missed events, so repeating it after success changes nothing. It also writes honest status. Otherwise the operator can be busy, the application unhappy, and every dashboard cheerfully uninformed.
Most people consume an existing operator rather than write one. Before inviting it in, examine lifecycle coverage, its RBAC, its CRD upgrade story, and what remains if the project is abandoned. Software that restores a database can rearrange one at machine speed. A plain chart and StatefulSet are better when there is no real day-2 runbook to encode.
Read the Intro for the architecture and decision points. Use Slides when the custom-resource plus controller relationship needs a quick map. Keep the Cheatsheet nearby when inspecting CRDs, status, finalizers, or ownership. The reference links lead to the Kubernetes contract and authoring frameworks once the bureaucrat needs to become an employee.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
Supports
- Operators as software extensions using custom resources to manage applications, following the control loop principle
- Human-operator motivation — capturing knowledge of deploying and operating a specific service
- Example operator behaviors — deploy, backup, upgrade-by-spec-change, recovery, simulation
- Deploying operators (CRD + controller Deployment); using operators via custom resources
- Writing operators with any API-client tooling when off-the-shelf doesn't fit
- https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
Supports
- CRDs registering new API types without code; custom resources as structured data
- Custom resources gaining kubectl, RBAC, and watch support like built-ins
- Combination of custom resources with custom controllers as declarative API
- When to use (and not use) custom resources
- https://kubernetes.io/docs/concepts/architecture/controller/
Supports
- Control loop principle — watching shared state and converging current toward desired
- Controllers acting via the API server; robustness of state-based reconciliation
- https://kubernetes.io/docs/concepts/extend-kubernetes/
Supports
- The extension-point landscape — where CRDs/controllers sit among webhooks, aggregation, plugins
- https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/
Supports
- CRD schemas, validation, versioning and serving mechanics
- https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
Supports
- Finalizers blocking deletion until controller cleanup; orphaned finalizers causing stuck deletion
- https://kubernetes.io/docs/concepts/overview/working-with-objects/owners-dependents/
Supports
- ownerReferences and garbage collection of dependent objects
- https://kubernetes.io/blog/2016/11/introducing-operators/
Supports
- Origin of the operator concept — application-specific operational knowledge encoded in software (CoreOS, 2016)
- https://github.com/kubernetes/kubernetes/releases/tag/v1.7.0
Supports
- CustomResourceDefinitions promoted to beta in Kubernetes 1.7
- https://www.redhat.com/en/blog/introducing-operator-framework-building-applications-kubernetes
Supports
- Introduction of the Operator Framework in 2018
- https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v1.0.0
Supports
- Kubebuilder 1.0 release
- https://github.com/operator-framework/operator-sdk/releases/tag/v0.1.0
Supports
- Operator SDK 0.1.0 release
- https://kubernetes.io/blog/2019/09/18/kubernetes-1-16-release-announcement/
Supports
- Kubernetes 1.16 CRD v1 API
- https://github.com/operator-framework/operator-sdk/releases/tag/v1.0.0
Supports
- Operator SDK 1.0.0 release
- https://kubernetes.io/blog/2021/04/09/kubernetes-release-1.22-upcoming-changes/
Supports
- Kubernetes 1.22 CRD v1beta1 removal
- https://operatorframework.io/
Supports
- Operator Framework components
- https://kubebuilder.io/
Supports
- Kubebuilder API extension development
- https://operator-framework.github.io/operator-controller/
Supports
- Operator Lifecycle Manager
- https://github.com/metacontroller/metacontroller
Supports
- Metacontroller controllers
- https://www.crossplane.io/
Supports
- Crossplane custom APIs and providers
- https://aws-controllers-k8s.github.io/community/
Supports
- AWS Controllers for Kubernetes
- https://azure.github.io/azure-service-operator/
Supports
- Azure Service Operator
