%%
date:: [[2022-11-18]]
%%
# [[Kubernetes Operator]]
A [[Kubernetes]] operator is like a custom resource controller. It leaves the [[Kubernetes#Controller manager|controller]] to monitor the default k8s objects, but takes on the responsibility of monitoring a custom resource itself. This is an example of [[The Operator Pattern]].
An operator can be thought of as a container that drives the configuration and operation of a workload. [^juju]
An operator should be used if the maintainer of the project you're using that includes the custom resource maintains it. Otherwise, the operator may not work well or require significant refactoring to use.
Should you build your own operator? Generally, no. Instead, consider using existing tools:
- Webhooks (OPA, Kyverno)
- Deployment tooling ([[Helm for Kubernetes]], [[ArgoCD]], Flux)
- Autoscalers (KEDA) [^operator]
[^operator]: Müller, M. (2021). _[[Kubernetes Operators - what they are and why you would need them|Kubernetes operator: What they are and why you would need them]]_. DevOps Pro 2021 Conference.
[^juju]: Canonical. _Why Juju_. Retrieved from: https://github.com/juju/juju