Common Operator and Custom Resource Definition concepts
This section explains the foundational ideas behind Operators, Custom Resource Definitions (CRDs), and Custom Resources (CRs), which are critical for managing complex applications — such as PAS-X MES — within a Kubernetes environment. These concepts form the basis for how the MES Operator automates deployment and lifecycle operations.
Terminology
What is a Kubernetes Operator?
According to the Kubernetes documentation, “Operators are software extensions that use custom resources to manage applications and their components.”
Operators encapsulate the operational knowledge of running a particular application on Kubernetes. Rather than managing a set of low-level Kubernetes objects (such as Pods, Deployments, Services, or ConfigMaps), the operator allows users to manage the application as a single, high-level object.
Operators implement control loops that monitor the current state of the system and reconcile it with the desired state defined in Custom Resources. This includes automating both:
-
Day-1 operations: installation, initial configuration, and setup.
-
Day-2 operations: upgrades, scaling, and recovery.
Kubernetes Operators integrate deeply with the Kubernetes API and act as controllers that manage one or more Custom Resource Definitions (CRDs) and their instances (CRs).
For further details, see the official Kubernetes documentation on Operators.
Why using Kubernetes Operators?
Using Kubernetes Operators offers a wide range of technical and business benefits:
Automation
Kubernetes Operators automate routine tasks, such as application deployments, updates, and scaling, reducing manual intervention. This automation saves time and operational costs for businesses by minimizing human error and streamlining repetitive processes.
Consistency and Standardization
Operators ensure consistent deployment and management of applications across various environments, maintaining uniformity and reducing configuration drift. This consistency leads to greater reliability and stability in the deployed applications.
Enhanced Reliability
Operators facilitate the implementation of best practices for application management, ensuring applications run reliably and are more resilient to failures. This increased reliability minimizes downtime, improving overall business continuity.
What are CRDs?
In Kubernetes, a Custom Resource Definition (CRD) allows you to extend the Kubernetes API with custom resource types. These resource types are not included in Kubernetes by default, but they can be defined and managed just like native Kubernetes resources.
A CRD defines:
-
A new resource type (kind) within the Kubernetes API
-
The schema/structure of the resource (validation, required fields, etc.)
-
The scope of the resource (namespace-scoped or cluster-scoped)
Example: Instance or GenericService might be CRDs used by the MES Operator.
What are CRs
A Custom Resource (CR) is a concrete instance of a CRD in the Kubernetes cluster. It defines the desired state or configuration for a particular application or component, which is then acted upon by an Operator.
CRs are actual YAML manifests that declare how a specific resource should behave. When a CR is applied to a cluster, the Operator reads it and reconciles the state accordingly.
For further details, see the official Kubernetes documentation on CRs and CRDs.