Kahibaro
Discord Login Register

OpenShift Operators

Why Operators Exist in OpenShift

Operators are OpenShift’s way of automating the lifecycle of complex software running on the cluster. Instead of cluster admins manually installing, configuring, upgrading, backing up, and healing services (databases, message queues, monitoring stacks, etc.), Operators codify this operational knowledge into software.

In OpenShift, Operators are:

Key motivation points:

Core Concepts: CRDs, Controllers, and the Operator Pattern

An Operator is typically built on three building blocks that already exist in Kubernetes:

In OpenShift, this pattern is standard for both cluster platform components and add‑on software.

Types of Operators in OpenShift

OpenShift uses Operators at multiple layers. While the exact boundaries can blur, it’s useful to distinguish a few categories:

Cluster and Infrastructure Operators

These Operators manage the OpenShift platform itself. They are usually installed and managed automatically as part of the cluster.

Examples (names are illustrative, not exhaustive):

Characteristics:

Platform and Add‑On Operators

These provide additional platform services that are not strictly required for the cluster to run, but commonly used in most environments:

Characteristics:

Application Operators

These Operators manage workloads that are applications from the cluster user’s perspective, such as:

Characteristics:

How Operators Behave in an OpenShift Cluster

Reconciliation and Desired State

Operators implement a continuous reconciliation loop:

  1. You create or modify a Custom Resource (for example, MyDatabase).
  2. The Operator is notified of the change (via Kubernetes watch).
  3. It:
    • Reads the desired specification in the CR.
    • Inspects the current cluster state (deployments, pods, PVCs, config maps, secrets, etc.).
    • Calculates the “diff” and applies the necessary changes.
  4. It repeats this process indefinitely, reacting to:
    • User changes to the CR.
    • External events (node failures, pod crashes, resource pressure).

This makes Operators robust against drift: if someone accidentally deletes a pod or service, the Operator recreates it to maintain the desired state.

Operator Scope: Cluster‑Scoped vs Namespace‑Scoped

In OpenShift you will encounter Operators with different scopes:

The scope is controlled through:

Interaction with OpenShift Features

Operators integrate well with OpenShift capabilities:

Common Lifecycle Tasks Automated by Operators

Operators automate a set of recurring tasks that would otherwise require scripts or manual runbooks:

Installation and Initial Configuration

Scaling and Topology Changes

Upgrades and Version Management

Backup, Restore, and Maintenance Operations

Self‑Healing and Reliability Behavior

How Operators Are Exposed to Users in OpenShift

While details of installation and lifecycle management are handled elsewhere, it is important to understand how Operators appear from a user perspective in OpenShift.

OperatorHub and Operator Catalogs

In the OpenShift web console:

Installed Operators and Provided APIs

Once installed:

From the CLI side, you can:

Status and Health Indications

Operators generally communicate health in several ways:

These indicators help admins quickly locate which Operator or CR is causing a problem.

Design and Usage Considerations

When working with Operators on OpenShift—either as a cluster admin selecting Operators or as a developer consuming them—there are several aspects to keep in mind.

Trust and Source of the Operator

Permission and Security Boundaries

Operational Behavior and Upgrades

When to Use Operators in OpenShift

Operators are beneficial when:

They may be less useful for:

Summary

In OpenShift, Operators are the primary mechanism for managing both the platform itself and complex services running on it. By extending Kubernetes with custom resources and controllers, they turn operational knowledge into continuously running automation.

Key points:

Views: 14

Comments

Please login to add a comment.

Don't have an account? Register now!