Operator Lifecycle Manager: Automating Operator Deployments in OpenShift
Discover how Red Hat’s Operator Lifecycle Manager (OLM) streamlines operator installation, upgrades, and dependency handling in OpenShift, with a step‑by‑step example using the Prometheus Operator.
21 Jan 2026, 06:12 UTC

What Problem Does OLM Solve?
In a Kubernetes‑based platform like OpenShift, operators package the logic needed to deploy, configure, and maintain an application. However, installing an operator, tracking its version, handling prerequisites, and rolling back a bad upgrade can be tedious and error‑prone. Operator Lifecycle Manager (OLM) is Red Hat’s built‑in solution that turns these tasks into declarative, repeatable steps.
Key Concepts in a Nutshell
- Operator – A controller that automates the lifecycle of a complex application.
- ClusterServiceVersion (CSV) – The manifest that describes a specific operator release, including its CRDs, permissions, and dependencies.
- Subscription – A declarative object that tells OLM which CSV channel to track and how aggressively to upgrade.
- Channel – A named stream of operator releases (e.g., stable, beta, alpha). Selecting a channel determines the cadence of updates.
- CatalogSource – A source of CSVs. The default OperatorHub is a CatalogSource; custom catalogs can be created for in‑house operators.
Why OLM is a Practical Engineering Decision
OLM removes manual steps that usually clutter operator management:
- Single‑click or single‑command installation from a curated catalog.
- Automatic dependency resolution – OLM installs required operators before the target.
- Declarative upgrade paths – you can pin a channel or roll to a newer one with a simple patch.
- Built‑in rollback – if a new CSV fails, OLM can revert to the previous stable version.
- Observability – CSV status and subscription health are exposed via the console and CLI.
Concrete Example: Installing, Upgrading, and Rolling Back Prometheus Operator
Below is a pragmatic walk‑through on an OKD 4.12 cluster. Replace my‑namespace with the namespace you want to use.
- Verify OLM is present
# Run as a user with cluster‑admin rights
oc get csv -A | grep olm
Expected: a list of CSVs including olm.operatorframework.io. If nothing appears, OLM is not installed.
- Install Prometheus Operator from OperatorHub
oc apply -f https://operatorhub.io/install/prometheus-operator.yaml -n my-namespace
Ongoing output will show the Subscription being created. Verify the Operator is running:
oc get pods -n my-namespace -l operators.coreos.com/prometheus-operator-operator=my-namespace
Check the CSV status:
oc get csv -n my-namespace -l operators.coreos.com/prometheus-operator-operator=my-namespace -o jsonpath='{.items[*].status.phase}'
Should output Succeeded when the operator is ready.
- Upgrade to a newer channel
Find the available channels:
oc get subscription -n my-namespace -o jsonpath='{.items[*].spec.channel}'
Assume stable is the current channel and beta contains the next release. Patch the subscription:
oc patch subscription prometheus-operator-operator -n my-namespace --type merge -p '{"spec":{"channel":"beta"}}'
Observe the CSV status transition to Succeeded with the new version number. Verify by inspecting the new CSV:
oc get csv -n my-namespace -o yaml | grep -E 'name:|version:'
- Rollback to the previous channel
Patch back to stable:
oc patch subscription prometheus-operator-operator -n my-namespace --type merge -p '{"spec":{"channel":"stable"}}'
After a few minutes, the CSV should revert to the earlier version. Verify with the same oc get csv command.
Trade‑offs and Limitations
- Resource Footprint – Each operator brings its own CRDs, controllers, and pods. In a cluster with many operators, cumulative resource use can become significant. Monitor
oc get pods -A -o wideand adjust resource requests/limits accordingly. - Channel Risk – Jumping to a
betaoralphachannel may introduce breaking changes. Keep a dedicated test namespace for upgrades before promoting to production. - Operator Compliance – OLM expects operators to follow Operator SDK conventions. Custom operators that deviate may fail to install or upgrade.
Actionable Takeaway
Adopting OLM turns operator management from a manual, copy‑paste exercise into a declarative workflow. By installing operators from the OperatorHub, pinning channels, and leveraging OLM’s built‑in upgrade and rollback mechanisms, you can reduce downtime and improve consistency across your OpenShift clusters.
Next steps: create a custom CatalogSource for your in‑house operators, or integrate OLM into your CI/CD pipeline using oc apply and oc patch to automate channel changes.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.