Get detailed status and health information for an operator
Retrieves comprehensive health and status information for OpenShift operators including CSV, Subscription, InstallPlan, deployments, and pods.
/plugin marketplace add openshift-eng/ai-helpers/plugin install olm@ai-helpers<operator-name> [namespace]olm:status
/olm:status <operator-name> [namespace]
The olm:status command provides comprehensive health and status information for a specific operator in an OpenShift cluster. It displays detailed information about the operator's CSV, Subscription, InstallPlan, deployments, and pods to help diagnose issues and verify proper operation.
This command helps you:
The command performs the following steps:
Parse Arguments:
$1: Operator name (required) - Name of the operator to inspect$2: Namespace (optional) - Namespace where operator is installed
Prerequisites Check:
oc CLI is installed: which ococ whoamiLocate Operator:
oc get subscription {operator-name} -n {namespace} --ignore-not-found
oc get subscription --all-namespaces -o json | jq -r '.items[] | select(.spec.name=="{operator-name}") | .metadata.namespace'
Gather Subscription Information:
oc get subscription {operator-name} -n {namespace} -o json
.spec.channel.spec.installPlanApproval.spec.source.spec.sourceNamespace.status.installedCSV.status.currentCSV.status.state.status.conditions[]Gather CSV Information:
oc get csv {csv-name} -n {namespace} -o json
.spec.displayName.spec.version.status.phase.status.message.status.reason.metadata.creationTimestamp.status.conditions[].status.requirementStatus[]Gather InstallPlan Information:
oc get installplan -n {namespace} -o json
.spec.clusterServiceVersionNames.metadata.name.status.phase (e.g., "Complete", "Installing", "Failed").spec.approved.status.bundleLookups[]Gather Deployment Information:
oc get deployments -n {namespace} -o json
.metadata.name.status.readyReplicas / .status.replicas.status.availableReplicas.status.conditions[]Gather Pod Information:
oc get pods -n {namespace} -l app={operator-label} -o json
.metadata.name.status.phase.status.containerStatuses[].restartCount.metadata.creationTimestampCheck for Recent Events:
oc get events -n {namespace} --field-selector involvedObject.name={csv-name} --sort-by='.lastTimestamp'
Check for Available Updates:
oc get packagemanifest {operator-name} -n openshift-marketplace -o json
.spec.channeloc get installplan -n {namespace} -o json | jq '.items[] | select(.spec.approved==false)'
oc get subscription {operator-name} -n {namespace} -o jsonpath='{.spec.installPlanApproval}'
Format Comprehensive Report: Create a structured report with sections:
A. Overview
Operator: {display-name}
Name: {operator-name}
Namespace: {namespace}
Version: {version}
Status: {phase}
B. Subscription
Channel: {channel}
Source: {source}
Install Plan Approval: {approval-mode} (Automatic|Manual)
State: {state}
Installed CSV: {installed-csv-name}
Current CSV: {current-csv-name}
C. ClusterServiceVersion (CSV)
Name: {csv-name}
Phase: {phase}
Message: {message}
Requirements: [list requirements status]
D. InstallPlan
Name: {installplan-name}
Phase: {phase} (Complete|Installing|RequiresApproval|Failed)
Approved: {true/false}
[If Phase=RequiresApproval and Approved=false:]
β οΈ Manual approval required for installation/upgrade
To approve: /olm:approve {operator-name} {namespace}
Or manually: oc patch installplan {installplan-name} -n {namespace} \
--type merge --patch '{"spec":{"approved":true}}'
E. Deployments
NAME READY AVAILABLE AGE
cert-manager 1/1 1 5d
cert-manager-webhook 1/1 1 5d
F. Pods
NAME STATUS READY RESTARTS AGE
cert-manager-7d4f8f8b4-abcde Running 1/1 0 5d
cert-manager-webhook-6b7c9d5f-fghij Running 1/1 0 5d
G. Recent Events (if any warnings/errors)
5m Warning InstallPlanFailed Failed to install...
2m Normal InstallSucceeded Successfully installed
H. Update Information
Current Version: {current-version}
Latest Available: {latest-version} (in channel: {channel})
Update Status: [Up to date | Update available | Unknown]
Available Channels:
- stable-v1 (latest: v1.13.1)
- tech-preview-v1.14 (latest: v1.14.0)
[If update available in current channel:]
π¦ Update available: {current-version} β {latest-version}
To update: /olm:upgrade {operator-name} {namespace}
[If newer version in different channel:]
π‘ Newer version available in channel '{new-channel}': {newer-version}
To switch channels: /olm:upgrade {operator-name} {namespace} --channel={new-channel}
I. Health Summary
β
Operator is healthy and running
β οΈ Operator has warnings (see events)
β Operator is not healthy (see details)
π Operator is upgrading (Current: {old-version} β Target: {new-version})
βΈοΈ Operator upgrade pending manual approval
Provide Actionable Recommendations:
β Operator failed: {reason}
Troubleshooting steps:
1. Check operator logs: oc logs -n {namespace} deployment/{operator-deployment}
2. Check events: oc get events -n {namespace} --sort-by='.lastTimestamp'
3. Check CSV conditions: oc describe csv {csv-name} -n {namespace}
4. Run diagnostics: /olm:diagnose {operator-name} {namespace}
π¦ Update available: {current} β {latest}
To upgrade: /olm:upgrade {operator-name} {namespace}
β οΈ Pods are crashing (restarts: {count})
Check logs: oc logs -n {namespace} {pod-name}
Previous logs: oc logs -n {namespace} {pod-name} --previous
βΈοΈ InstallPlan requires manual approval
InstallPlan: {installplan-name}
Version: {target-version}
To approve: /olm:approve {operator-name} {namespace}
Or manually: oc patch installplan {installplan-name} -n {namespace} \
--type merge --patch '{"spec":{"approved":true}}'
To switch to automatic approvals:
oc patch subscription {operator-name} -n {namespace} \
--type merge --patch '{"spec":{"installPlanApproval":"Automatic"}}'
π Operator upgrade in progress: {old-version} β {new-version}
Monitor progress: watch oc get csv,installplan -n {namespace}
Check status of cert-manager operator:
/olm:status openshift-cert-manager-operator
Check status with specific namespace:
/olm:status external-secrets-operator external-secrets-operator
oc get subscriptions --all-namespaces | grep {operator-name}/olm:list/olm:status {operator-name} {namespace}oc auth can-i get csv -n {namespace}/olm:list - List all installed operators/olm:install <operator-name> - Install a new operator/olm:uninstall <operator-name> - Uninstall an operator/olm:upgrade <operator-name> - Upgrade an operator/olm:approve <operator-name> - Approve pending InstallPlans/olm:diagnose <operator-name> - Diagnose and fix operator issues