5.2.3. Installing a cluster extension in all namespaces


You can install an extension from a catalog by creating a custom resource (CR) and applying it to the cluster. Operator Lifecycle Manager (OLM) v1 supports installing cluster extensions, including OLM (Classic) Operators in the registry+v1 bundle format, that are scoped to the cluster. For more information, see Supported extensions.

참고

For OpenShift Container Platform 4.21, documented procedures for OLM v1 are CLI-based only. Alternatively, administrators can create and view related objects in the web console by using normal methods, such as the Import YAML and Search pages. However, the existing Software Catalog and Installed Operators pages do not yet display OLM v1 components.

Prerequisites

  • You have created a service account and assigned enough role-based access controls (RBAC) to install, update, and manage the extension that you want to install. For more information, see "Cluster extension permissions".

Procedure

  1. Create a CR, similar to the following example:

    apiVersion: olm.operatorframework.io/v1
      kind: ClusterExtension
      metadata:
        name: <clusterextension_name>
      spec:
        namespace: <installed_namespace> 
    1
    
        serviceAccount:
          name: <service_account_installer_name> 
    2
    
        source:
          sourceType: Catalog
          catalog:
            packageName: <package_name>
            channels:
              - <channel_name> 
    3
    
            version: <version_or_version_range> 
    4
    
            upgradeConstraintPolicy: CatalogProvided 
    5
    1
    Specifies the namespace where you want the bundle installed, such as pipelines or my-extension. Extensions are still cluster-scoped and might contain resources that are installed in different namespaces.
    2
    Specifies the name of the service account you created to install, update, and manage your extension.
    3
    Optional: Specifies channel names as an array, such as pipelines-1.14 or latest.
    4
    Optional: Specifies the version or version range, such as 1.14.0, 1.14.x, or >=1.16, of the package you want to install or update. For more information, see "Example custom resources (CRs) that specify a target version" and "Support for version ranges".
    5
    Optional: Specifies the upgrade constraint policy. If unspecified, the default setting is CatalogProvided. The CatalogProvided setting only updates if the new version satisfies the upgrade constraints set by the package author. To force an update or rollback, set the field to SelfCertified. For more information, see "Forcing an update or rollback".

Example pipelines-operator.yaml CR

apiVersion: olm.operatorframework.io/v1
kind: ClusterExtension
metadata:
  name: pipelines-operator
spec:
  namespace: pipelines
  serviceAccount:
    name: pipelines-installer
  source:
    sourceType: Catalog
    catalog:
      packageName: openshift-pipelines-operator-rh
      version: "1.14.x"

  1. Apply the CR to the cluster by running the following command:

    $ oc apply -f pipeline-operator.yaml

    Example output

    clusterextension.olm.operatorframework.io/pipelines-operator created

Verification

  1. View the Operator or extension’s CR in the YAML format by running the following command:

    $ oc get clusterextension pipelines-operator -o yaml

    예 5.11. Example output

    apiVersion: v1
    items:
    - apiVersion: olm.operatorframework.io/v1
      kind: ClusterExtension
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: |
            {"apiVersion":"olm.operatorframework.io/v1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"pipes"},"spec":{"namespace":"pipelines","serviceAccount":{"name":"pipelines-installer"},"source":{"catalog":{"packageName":"openshift-pipelines-operator-rh","version":"1.14.x"},"sourceType":"Catalog"}}}
        creationTimestamp: "2025-02-18T21:48:13Z"
        finalizers:
        - olm.operatorframework.io/cleanup-unpack-cache
        - olm.operatorframework.io/cleanup-contentmanager-cache
        generation: 1
        name: pipelines-operator
        resourceVersion: "72725"
        uid: e18b13fb-a96d-436f-be75-a9a0f2b07993
      spec:
        namespace: pipelines
        serviceAccount:
          name: pipelines-installer
        source:
          catalog:
            packageName: openshift-pipelines-operator-rh
            upgradeConstraintPolicy: CatalogProvided
            version: 1.14.x
          sourceType: Catalog
      status:
        conditions:
        - lastTransitionTime: "2025-02-18T21:48:13Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: Deprecated
        - lastTransitionTime: "2025-02-18T21:48:13Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: PackageDeprecated
        - lastTransitionTime: "2025-02-18T21:48:13Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: ChannelDeprecated
        - lastTransitionTime: "2025-02-18T21:48:13Z"
          message: ""
          observedGeneration: 1
          reason: Deprecated
          status: "False"
          type: BundleDeprecated
        - lastTransitionTime: "2025-02-18T21:48:16Z"
          message: Installed bundle registry.redhat.io/openshift-pipelines/pipelines-operator-bundle@sha256:f7b19ce26be742c4aaa458d37bc5ad373b5b29b20aaa7d308349687d3cbd8838
            successfully
          observedGeneration: 1
          reason: Succeeded
          status: "True"
          type: Installed
        - lastTransitionTime: "2025-02-18T21:48:16Z"
          message: desired state reached
          observedGeneration: 1
          reason: Succeeded
          status: "True"
          type: Progressing
        install:
          bundle:
            name: openshift-pipelines-operator-rh.v1.14.5
            version: 1.14.5
    kind: List
    metadata:
      resourceVersion: ""

    where:

    spec.channel
    Displays the channel defined in the CR of the extension.
    spec.version
    Displays the version or version range defined in the CR of the extension.
    status.conditions
    Displays information about the status and health of the extension.
    type: Deprecated

    Displays whether one or more of following are deprecated:

    type: PackageDeprecated
    Displays whether the resolved package is deprecated.
    type: ChannelDeprecated
    Displays whether the resolved channel is deprecated.
    type: BundleDeprecated
    Displays whether the resolved bundle is deprecated.

    The value of False in the status field indicates that the reason: Deprecated condition is not deprecated. The value of True in the status field indicates that the reason: Deprecated condition is deprecated.

    installedBundle.name
    Displays the name of the bundle installed.
    installedBundle.version
    Displays the version of the bundle installed.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동