Install an Extension from a Catalog
In Operator Lifecycle Manager (OLM) 1.0, Kubernetes extensions are scoped to the cluster. After you add a catalog to your cluster, you can install an extension by creating a custom resource (CR) and applying it.
Prerequisites
- A catalog that is being served
- The name, and optionally version, or channel, of the supported extension to be installed
- An existing namespace in which to install the extension
Procedure
-
Create a CR for the Kubernetes extension you want to install:
Example CRapiVersion: olm.operatorframework.io/v1 kind: ClusterExtension metadata: name: <extension_name> spec: namespace: <namespace_name> source: sourceType: Catalog catalog: packageName: <package_name> channels: [<channel1>,<channel2] version: "<version>"extension_name- Specifies a custom name for the Kubernetes extension you want to install, such as
my-camel-k. package_name- Specifies the name of the package you want to install, such as
camel-k. channels- Optional: Specifies a set of the extension's channels from which to select, such as
stableorfast. version- Optional: Specifies the version or version range you want installed, such as
1.3.1or"<2". If you use a comparison string to define a version range, the string must be surrounded by double quotes ("). namespace_name- Specifies a name for the namespace in which the bundle of content for the package referenced in the packageName field will be applied.
Warning
Currently, the following limitations affect the installation of extensions:
- If multiple catalogs are added to a cluster, you cannot specify a catalog when you install an extension.
- OLM 1.0 requires that all of the extensions have unique bundle and package names for dependency resolution.
As a result, if two catalogs have an extension with the same name, the installation might fail or lead to an unintended outcome. For example, the first extension that matches might install successfully and finish without searching for a match in the second catalog.
-
Apply the CR to the cluster:
Verification
-
Describe the installed extension:
Success
Example outputName: argocd Namespace: Labels: <none> Annotations: <none> API Version: olm.operatorframework.io/v1 Kind: ClusterExtension Metadata: Creation Timestamp: 2024-11-11T13:41:23Z Finalizers: olm.operatorframework.io/cleanup-unpack-cache olm.operatorframework.io/cleanup-contentmanager-cache Generation: 1 Resource Version: 5426 UID: bde55f03-abe2-48af-8c09-28d32df878ad Spec: Namespace: argocd Source: Catalog: Package Name: argocd-operator Upgrade Constraint Policy: CatalogProvided Version: 0.6.0 Source Type: Catalog Status: Conditions: Last Transition Time: 2024-11-11T13:41:23Z Message: Observed Generation: 1 Reason: Deprecated Status: False Type: Deprecated Last Transition Time: 2024-11-11T13:41:23Z Message: Observed Generation: 1 Reason: Deprecated Status: False Type: PackageDeprecated Last Transition Time: 2024-11-11T13:41:23Z Message: Observed Generation: 1 Reason: Deprecated Status: False Type: ChannelDeprecated Last Transition Time: 2024-11-11T13:41:23Z Message: Observed Generation: 1 Reason: Deprecated Status: False Type: BundleDeprecated Last Transition Time: 2024-11-11T13:41:31Z Message: Installed bundle quay.io/operatorhubio/argocd-operator@sha256:d538c45a813b38ef0e44f40d279dc2653f97ca901fb660da5d7fe499d51ad3b3 successfully Observed Generation: 1 Reason: Succeeded Status: True Type: Installed Last Transition Time: 2024-11-11T13:41:32Z Message: desired state reached Observed Generation: 1 Reason: Succeeded Status: True Type: Progressing Install: Bundle: Name: argocd-operator.v0.6.0 Version: 0.6.0 Events: <none>