What is Operator?
Also known as: Kubernetes Operator
A Kubernetes Operator is a custom controller that extends the Kubernetes API to automate the management of a specific application, encoding human operational knowledge as code.
A Kubernetes Operator is a software extension that uses custom resources and controllers to manage complex stateful applications on Kubernetes. It encapsulates the operational knowledge of a human site reliability engineer (SRE) into code, automating tasks such as deployment, scaling, backup, recovery, and upgrades. The Operator pattern was first introduced by CoreOS in 2016 and has since become a standard approach for managing applications like databases, message queues, and monitoring systems on Kubernetes.
The Operator works by defining one or more custom resource definitions (CRDs) that represent the application's desired state. A controller, typically written in Go, runs inside the Kubernetes cluster and watches for changes to these CRDs. When a user creates or updates a custom resource, the controller reconciles the actual state of the application with the desired state, executing the necessary steps to achieve and maintain that state. This reconciliation loop is the core mechanism, allowing the Operator to handle failures, scale events, and configuration changes automatically.
Operators sit above the core Kubernetes controllers (like Deployments and StatefulSets) in the stack. While built-in controllers handle generic pod lifecycle, Operators provide application-specific logic. The Operator Lifecycle Manager (OLM) and OperatorHub.io provide a registry and management framework for distributing Operators. The community maintains a large catalog of Operators for popular software such as etcd, Prometheus, PostgreSQL, and Elasticsearch. The pattern is formalized in the Operator Framework, an open source toolkit from Red Hat.
Key facts
- An Operator extends the Kubernetes API with custom resources and a custom controller.
- The Operator pattern was introduced by CoreOS in 2016 for managing etcd clusters.
- Operators encode domain-specific operational knowledge, automating tasks like backups and upgrades.
- The Operator Lifecycle Manager (OLM) manages installation, upgrades, and lifecycle of Operators.
- OperatorHub.io hosts a community catalog of over 300 Operators for various applications.
How it works in practice
Related terms
References
More in Containers & Orchestration
ConfigMap
A ConfigMap is a Kubernetes API object used to store non-confidential configuration data in key-value pairs, which pods can consume as environment variables, command-line arguments, or configuration files.
Container
A container is a lightweight, isolated runtime that packages an application with its dependencies using OS-level virtualization, enabling consistent execution across environments.
Container Image
A container image is a lightweight, standalone, executable package that includes everything needed to run a piece of software: code, runtime, system tools, libraries, and settings. It is the unit of distribution in container ecosystems like Docker and Kubernetes.
Container Registry
A container registry is a service that stores and distributes container images, enabling developers to push, pull, and version images across environments.
Container Runtime
A container runtime is the low-level software that creates, starts, and stops containers according to the OCI runtime specification, enabling process isolation and resource management.
Docker
Docker is a platform and toolchain for packaging, distributing, and running applications inside lightweight, portable containers, popularising the technology from 2013 onward.
Helm
Helm is a package manager for Kubernetes that uses charts to define, install, and upgrade complex applications as a single, versioned unit.
Ingress Controller
An Ingress Controller is a Kubernetes component that watches Ingress resources and configures a reverse proxy to route external HTTP and HTTPS traffic to services inside the cluster.
Init Container
An init container is a specialized container in a Kubernetes pod that runs to completion before any regular containers start, performing initialization or setup tasks.
Kubernetes
Kubernetes is an open source platform for automating the deployment, scaling, and management of containerized applications across clusters of hosts.