Operators

Operators

Original: https://coreos.com/operators/

Overview

An Operator is an application-specific controller that extends the Kubernetes API to create, configure, and manage complex, stateful application instances on behalf of Kubernetes users. It builds on basic Kubernetes resource and controller concepts, but also includes domain or application-specific knowledge to automate common tasks that are better managed by computers.

We use Operators because managing stateful applications such as databases, caches, and monitoring systems is a huge challenge, especially at scale. These systems require people with specialized operational knowledge to properly scale, upgrade and reconfigure while preventing data loss and unavailability.

An Operator represents human operational knowledge in software to reliably manage an application.

So we (can) take the same operational knowledge to manage relatively small clusters and code it into software for use. Operators can then leverage the powerful Kubernetes abstractions to properly run and manage applications, and at scale.

How Operators work

Operators extend the Kubernetes API with third-party resource mechanisms, enabling users to create, configure, and manage applications. Like Kubernetes built-in resources, operators manage not only a single instance of an application, but multiple instances in a cluster.

For example, the etcd Operator can simulate the behavior of a human operator in three steps. First, it observes the current state of the cluster by using the Kubernetes API, and then, it discovers and analyzes the difference between the desired state and the current state. Finally, it fixes these differences via one or both of the etcd cluster management API or the Kubernetes API. Suppose we have an etcd cluster of 3 members and one of the clusters fails. The etcd Operator constantly compares the desired state (3 members) with the current state (2 members). In this case, the operator repairs the cluster by replacing the dead member with a new one. The etcd cluster is now back to a healthy state.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324821124&siteId=291194637