Kubernetes operators extend the Kubernetes API with custom resources and controllers that automate complex application lifecycle management. The decision of when to write an operator versus using Helm or simpler deployment tooling is clearer than it was three years ago.

What operators add over Helm

Helm manages the deployment of Kubernetes resources from templates. It installs, upgrades, and uninstalls but does not watch for drift or handle complex operational logic. An operator adds a control loop: it watches a custom resource, computes the desired state, and reconciles the actual state to match. Operators can automate complex multi-step operations: taking a database backup before upgrade, managing leader election for stateful applications, handling failover with application-specific logic.

The operator pattern is for stateful applications

The clearest use case for operators is stateful applications that have complex operational requirements: databases (PostgreSQL Operator, Elasticsearch ECK Operator, Redis Operator), message brokers (Strimzi for Kafka), and certificate management (cert-manager). These applications have lifecycle operations (scale, backup, restore, upgrade, failover) that require application-specific knowledge that cannot be expressed in static Helm templates.

Operator SDK and controller-runtime

The Operator SDK (from Red Hat) and controller-runtime (from the Kubernetes team) are the two primary frameworks for writing operators in Go. The SDK provides scaffolding, code generation for CRD and controller boilerplate, and testing utilities. Kubebuilder uses controller-runtime directly. Both frameworks have improved significantly and reduce the boilerplate required to write a correct, production-grade operator.

When not to write an operator

Writing and maintaining an operator requires ongoing Go development and Kubernetes expertise. For stateless applications that are deployable with standard Kubernetes resources (Deployment, Service, ConfigMap), Helm provides sufficient lifecycle management. The decision heuristic: does the application have operational logic that requires a controller loop and custom resources? If the answer is no, Helm or Kustomize is sufficient.