# Operator

> Use Operators to manage complex applications on Kubernetes

- **Category**: Cloud
- **Subcategory**: Advanced
- **Canonical URL**: https://designpattern.fyi/patterns/k8s_operator/

---

## Description
The Operator pattern extends Kubernetes controllers to manage complex applications using custom resources and controllers. Operators encode operational knowledge as code, automating tasks like deployment, scaling, backup, and upgrade of complex stateful applications. This is the natural evolution of controllers for domain-specific automation.


## Use Cases
Use when managing complex applications on Kubernetes or when you need to encode operational knowledge as automation.





## Trade-offs


### Advantages

- Encodes operational knowledge

- Automates complex application lifecycle

- Domain-specific automation

- Self-healing and auto-scaling capabilities




### Considerations & Drawbacks

- Complex to develop and maintain

- Requires deep domain and Kubernetes knowledge

- Adds complexity to cluster operations







