{
  "schema_version": 2,
  "id": "operate/kubernetes/architecture/operator",
  "title": "Redis Enterprise for Kubernetes operator-based architecture",
  "url": "https://redis.io/docs/latest/operate/kubernetes/7.4.6/architecture/operator/",
  "summary": "This section provides a description of the design of Redis Enterprise for Kubernetes.",
  "content": "Redis Enterprise is the fastest, most efficient way to\ndeploy and maintain a Redis Enterprise cluster in Kubernetes.\n\n## What is an operator?\n\nAn operator is a [Kubernetes custom controller](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-controllers) which extends the native K8s API.\n\nOperators were developed to handle sophisticated, stateful applications\nthat the default K8s controllers aren’t able to handle. While stock\nKubernetes controllers—for example,\n[StatefulSets](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/)—are\nideal for deploying, maintaining and scaling simple stateless\napplications, they are not equipped to handle access to stateful\nresources, upgrade, resize and backup of more elaborate, clustered\napplications such as databases.\n\n## What does an operator do?\n\nIn abstract terms, Operators encode human operational knowledge into\nsoftware that can reliably manage an application in an extensible,\nmodular way and do not hinder the basic primitives that comprise the K8s\narchitecture.\n\nRedis created an operator that deploys and manages the lifecycle of a Redis Enterprise Cluster.\n\nThe Redis Enterprise operator acts as a custom controller for the custom\nresource RedisEnterpriseCluster, or ‘rec’, which is defined through K8s\nCRD ([custom resource definition](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#custom-resources))\nand deployed with a yaml file.\n\nThe operator functions include:\n\n- Validating the deployed Cluster spec (for example, requiring the\ndeployment of an odd number of nodes)\n- Implementing a reconciliation loop to monitor all the applicable\nresources\n- Logging events\n- Enabling a simple mechanism for editing the Cluster spec\n\nThe Redis Enterprise operator functions as the logic \"glue\" between the\nK8s infrastructure and the Redis Enterprise Cluster.\n\nThe operator creates the following resources:\n\n- Service account\n- Service account role\n- Service account role binding\n- Secret – holds the cluster username, password, and license\n- Statefulset – holds Redis Enterprise nodes\n- The Services Manager deployment – exposes databases and tags nodes\n- The Redis UI service\n- The service that runs the REST API + Sentinel\n- Pod Disruption Budget\n- Optionally: a deployment for the Service Broker, including services and a PVC\n\nThe following diagram shows the high-level architecture of the Redis\nEnterprise operator:\n\n![](https://redis.io/docs/latest/images/k8s/k8-high-level-architecture-diagram-of-redis-enterprise.png)\n",
  "tags": ["docs","operate","kubernetes"],
  "last_updated": "0001-01-01T00:00:00Z"
}
