# OpenSearch K8s Operator: High Level Design
The k8s OpenSearch Operator is a software, written following the pattern of [Kubernetes Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/), with the goal of automating the provisioning, management, and orchestration of OpenSearch clusters on Kubernetes
## High Level Overview
The OpenSearch Kubernetes Operator, as any other operator, is a process, deployed to Kubernetes as a container. It has several functionalities:
1. Provisioning: Deploying OpenSearch Clusters to Kubernetes, based on a descriptor provided by the user. The descriptor can be changed by the user, and the environment may also change (e.g. machines terminates, etc.). The operator responds and makes sure the running OpenSearch Cluster and other components it deploys, matches the descriptor. The OpenSearch clusters deployed are configured based on the descriptors.
2. Monitoring: Deploying tools needed to allow the person operating OpenSearch to have ready-made working dashboards and alerts.
3. Auto-scaling: Based on OpenSearch metrics, the number of OpenSearch pods will be changed to match current workload.
### Operator Configuration
The descriptor, provided by the user, is a configuration data structure specifying:
* Cluster composition: How many pods and which role they will run? What's their pod specification (cpu, memory, ...)?
* Cluster configuration: Configuration of OpenSearch
* Operator Configuration: Security, Monitoring, Auto Scaling, OpenSearch Dashboard, ...
The descriptor is a [Custom Resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) which effectively is a YAML answering to a schema (called a [Custom Resource Definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions)). The operator is bundled with a [schema](../../opensearch-operator/config/crd/bases/opensearch.opster.io_opensearchclusters.yaml) for this resource which is deployed when deploying this operator.
Each custom resource answering to that schema (kind: `OpenSearchCluster`) represents a **single** OpenSearch cluster.
See [Custom Resource Reference Guide](crd.md) for a full reference to the custom resource.
This file has been truncated. show original