Search for available operators in catalog sources
Searches for available operators in OperatorHub catalog sources by name, description, or keywords.
/plugin marketplace add openshift-eng/ai-helpers/plugin install olm@ai-helpers[query] [--catalog <catalog-name>]olm:search
/olm:search [query] [--catalog <catalog-name>]
The olm:search command searches for available operators in the cluster's catalog sources (OperatorHub). It helps you discover operators that can be installed, showing their names, descriptions, versions, channels, and catalog sources.
This command helps you:
The command searches across all available catalog sources (redhat-operators, certified-operators, community-operators, redhat-marketplace, and custom catalogs) and presents results in an easy-to-read format.
The command performs the following steps:
Parse Arguments:
$1: Query string (optional) - Search term for filtering operators
$2+: Flags (optional):
--catalog <catalog-name>: Limit search to specific catalog source--exact: Only show exact name matches--installed: Show only installed operators (combination with /olm:list)Prerequisites Check:
oc CLI is installed: which ococ whoamiFetch Catalog Data:
oc get packagemanifests -n openshift-marketplace -o json
--catalog flag is specified, filter by catalog source:
oc get packagemanifests -n openshift-marketplace -o json | jq '.items[] | select(.status.catalogSource=="{catalog-name}")'
Parse PackageManifest Data:
.metadata.name.status.channels[0].currentCSVDesc.displayName.status.channels[0].currentCSVDesc.description.status.provider.name.status.catalogSource.status.catalogSourceNamespace.status.defaultChannel.status.channels[].name.status.channels[] | select(.name==.status.defaultChannel) | .currentCSVDesc.version.status.channels[0].currentCSVDesc.annotations["categories"].status.channels[0].currentCSVDesc.annotations["capabilities"]Apply Search Filter (if query provided):
.metadata.name).status.channels[0].currentCSVDesc.displayName).status.channels[0].currentCSVDesc.description).status.provider.name)--exact flag, only match exact operator namesSort Results:
Format Search Results:
A. Summary Header
Found X operators matching "{query}"
B. Results List For each operator:
┌─────────────────────────────────────────────────────────────
│ cert-manager-operator for Red Hat OpenShift
├─────────────────────────────────────────────────────────────
│ Name: openshift-cert-manager-operator
│ Provider: Red Hat
│ Catalog: redhat-operators
│ Default: stable-v1
│ Channels: stable-v1, tech-preview-v1.13
│ Version: v1.13.1
│ Categories: Security
│
│ Description: Manages the lifecycle of TLS certificates...
│
│ Install: /olm:install openshift-cert-manager-operator
└─────────────────────────────────────────────────────────────
Group by Catalog (optional, for better readability):
═════════════════════════════════════════════════════════════
RED HAT OPERATORS (3)
═════════════════════════════════════════════════════════════
[List of operators from redhat-operators]
═════════════════════════════════════════════════════════════
CERTIFIED OPERATORS (1)
═════════════════════════════════════════════════════════════
[List of operators from certified-operators]
═════════════════════════════════════════════════════════════
COMMUNITY OPERATORS (2)
═════════════════════════════════════════════════════════════
[List of operators from community-operators]
Provide Installation Guidance:
To install: /olm:install {operator-name}
Handle No Results:
No operators found matching "{query}"
Suggestions:
- Try a broader search term
- List all available operators: /olm:search
- Check specific catalog: /olm:search {query} --catalog redhat-operators
Show Popular/Recommended Operators (if no query provided):
Search for cert-manager operator:
/olm:search cert-manager
Search for secrets-related operators:
/olm:search secrets
Output listing multiple operators related to secrets management.
List all operators (no query):
/olm:search
Search in specific catalog:
/olm:search prometheus --catalog community-operators
Output showing only Prometheus-related operators from community-operators catalog.
Exact name match:
/olm:search external-secrets-operator --exact
Output showing only the exact match for external-secrets-operator.
Search for operators by category (e.g., security):
/olm:search security
Output listing all security-related operators.
--catalog <catalog-name>: Limit search to specific catalog
--exact: Only show exact name matches (no partial matching)--installed: Show only operators that are currently installedoc get catalogsources -n openshift-marketplace
oc get pods -n openshift-marketplace
--catalog redhat-operatorsoc auth can-i list packagemanifests -n openshift-marketplace
/olm:install <operator-name> - Install an operator found in search results/olm:list - List installed operators/olm:status <operator-name> - Check status of an installed operator