4.12. 플랫폼 Operator 관리 (기술 프리뷰)

Platform Operator는 OpenShift Container Platform 클러스터의 Day 0 작업 중 또는 이후에 설치할 수 있고 클러스터의 라이프사이클에 참여할 수 있는 OLM 기반 Operator입니다. 클러스터 관리자는 PlatformOperator API를 사용하여 플랫폼 Operator를 관리할 수 있습니다.

중요

platform Operator 유형은 기술 프리뷰 기능 전용입니다. 기술 프리뷰 기능은 Red Hat 프로덕션 서비스 수준 계약(SLA)에서 지원되지 않으며 기능적으로 완전하지 않을 수 있습니다. 따라서 프로덕션 환경에서 사용하는 것은 권장하지 않습니다. 이러한 기능을 사용하면 향후 제품 기능을 조기에 이용할 수 있어 개발 과정에서 고객이 기능을 테스트하고 피드백을 제공할 수 있습니다.

Red Hat 기술 프리뷰 기능의 지원 범위에 대한 자세한 내용은 기술 프리뷰 기능 지원 범위를 참조하십시오.

4.12.1. 플랫폼 Operator 정보

OLM(Operator Lifecycle Manager)에는 platform Operators 라는 새로운 유형의 Operator가 도입되었습니다. Platform Operator는 OpenShift Container Platform 클러스터의 Day 0 작업 중 또는 이후에 설치할 수 있고 클러스터의 라이프사이클에 참여할 수 있는 OLM 기반 Operator입니다. 클러스터 관리자는 플랫폼 Operator를 사용하여 요구 사항 및 사용 사례에 맞게 OpenShift Container Platform 설치를 추가로 사용자 지정할 수 있습니다.

클러스터 관리자는 OpenShift Container Platform의 기존 클러스터 기능 기능을 사용하여 CVO(Cluster Version Operator 기반) 구성 요소의 서브 세트를 클러스터 설치 전에 초기 페이로드에 필수적이지 않은 것으로 간주할 수 있습니다. 플랫폼 Operator는 추가 사용자 정의 옵션을 제공하여 이 모델에서 반복합니다. RukPak 구성 요소의 리소스에 의존하는 플랫폼 Operator 메커니즘을 통해 이제 OLM 기반 Operator를 클러스터 설치 시 설치할 수 있으며 Operator가 성공적으로 설치되지 못하는 경우 클러스터 롤아웃을 차단할 수 있습니다.

OpenShift Container Platform 4.12에서 이 기술 프리뷰 릴리스는 기본 플랫폼 Operator 메커니즘에 중점을 두고 향후 릴리스에서 개념을 확장하기 위한 기반을 구축합니다. Cluster-wide PlatformOperator API를 사용하여 TechPreviewNoUpgrades 기능 세트를 활성화한 클러스터에서 클러스터 생성 전이나 후에 Operator를 구성할 수 있습니다.

4.12.1.1. 플랫폼 Operator의 기술 프리뷰 제한 사항

OpenShift Container Platform 4.12의 플랫폼 Operator 기능의 기술 프리뷰 릴리스 중에 다음 제한 사항은 플랫폼 Operator 메커니즘을 통해 Operator를 설치할 수 있는지 여부를 결정합니다.

  • Kubernetes 매니페스트는 OLM(Operator Lifecycle Manager) 레지스트리+v1 번들 형식을 사용하여 패키징해야 합니다.
  • Operator는 패키지 또는 GVK(그룹/버전/종류) 종속 항목을 선언할 수 없습니다.
  • Operator는 AllNamespaces이외의 CSV(클러스터 서비스 버전) 설치 모드를 지정할 수 없습니다.
  • Operator는 Webhook 또는 APIService 정의를 지정할 수 없습니다.
  • 모든 패키지 번들은 redhat-operators 카탈로그 소스에 있어야 합니다.

이러한 제한 사항을 고려한 후 다음 Operator를 성공적으로 설치할 수 있습니다.

표 4.2. 플랫폼 Operator로 설치할 수 있는 OLM 기반 Operator

3scale-operator

amq-broker-rhel8

AMQ-online

amq-streams

ansible-cloud-addons-operator

apicast-operator

container-security-operator

EAP

file-integrity-operator

gatekeeper-operator-product

integration-operator

jws-operator

kiali-ossm

node-healthcheck-operator

odf-csi-addons-operator

odr-hub-operator

openshift-custom-metrics-autoscaler-operator

openshift-gitops-operator

openshift-pipelines-operator-rh

quay-operator

red-hat-camel-k

rhpam-kogito-operator

service-registry-operator

servicemeshoperator

skupper-operator

 
참고

이 기술 프리뷰 릴리스에서는 다음 기능을 사용할 수 없습니다.

  • 클러스터 롤아웃 후 플랫폼 Operator 패키지 자동 업그레이드
  • 선택적 CVO 기반 구성 요소를 지원하기 위해 플랫폼 Operator 메커니즘 확장

4.12.2. 사전 요구 사항

  • cluster-admin 권한이 있는 계정을 사용하여 OpenShift Container Platform 클러스터에 액세스할 수 있습니다.
  • 클러스터에서 TechPreviewNoUpgrades 기능 세트가 활성화되어 있습니다.

    주의

    TechPreviewNoUpgrade 기능 세트를 활성화하면 취소할 수 없으며 마이너 버전 업데이트를 방지할 수 없습니다. 이러한 기능 세트는 프로덕션 클러스터에서는 권장되지 않습니다.

  • 클러스터에서는 redhat-operators 카탈로그 소스만 활성화되어 있습니다. 이는 기술 프리뷰 릴리스 중 제한 사항입니다.
  • oc 명령이 워크스테이션에 설치되어 있습니다.

4.12.3. 클러스터 생성 중 플랫폼 Operator 설치

클러스터 관리자는 클러스터 생성 중에 FeatureGatePlatformOperator 매니페스트를 제공하여 플랫폼 Operator를 설치할 수 있습니다.

프로세스

  1. 지원되는 OLM 기반 Operator 세트에서 플랫폼 Operator를 선택합니다. 이 세트 목록 및 현재 제한 사항에 대한 자세한 내용은 "플랫 플랫폼 Operator에 대한 프리뷰 제한 기술"을 참조하십시오.
  2. 클러스터 설치 방법을 선택하고 install-config.yaml 파일을 생성하는 방법을 설명합니다. 클러스터 설치 준비에 대한 자세한 내용은 "클러스터 설치 방법 선택 및 사용자를 위한 준비"를 참조하십시오.
  3. install-config.yaml 파일을 생성하고 수정 사항을 완료한 후 설치 프로그램이 포함된 디렉터리로 변경하고 매니페스트를 생성합니다.

    $ ./openshift-install create manifests --dir <installation_directory> 1
    1
    <installation_directory>는 클러스터의 install-config.yaml 파일이 포함된 디렉터리의 이름을 지정합니다.
  4. TechPreviewNoUpgrade 기능 세트를 활성화하는 < installation_directory>/manifests/ 디렉터리에 FeatureGate 오브젝트 YAML 파일을 만듭니다(예: feature-gate.yaml 파일).

    feature-gate.yaml 파일 예

    apiVersion: config.openshift.io/v1
    kind: FeatureGate
    metadata:
      annotations:
        include.release.openshift.io/self-managed-high-availability: "true"
        include.release.openshift.io/single-node-developer: "true"
        release.openshift.io/create-only: "true"
      name: cluster
    spec:
      featureSet: TechPreviewNoUpgrade 1

    1
    TechPreviewNoUpgrade 기능 세트를 활성화합니다.
  5. < installation_directory>/manifests/ 디렉터리에 선택한 플랫폼 Operator에 대한 PlatformOperator 오브젝트 YAML 파일을 생성합니다(예: Red Hat OpenShift Service Mesh Operator의 service-mesh-po.yaml 파일).

    service-mesh-po.yaml 파일 예

    apiVersion: platform.openshift.io/v1alpha1
    kind: PlatformOperator
    metadata:
      name: service-mesh-po
    spec:
      package:
        name: servicemeshoperator

  6. 클러스터 설치를 완료할 준비가 되면 선택한 설치 방법을 참조하여 openshift-install create cluster 명령 실행을 계속합니다.

    클러스터 생성 중에 제공된 매니페스트는 TechPreviewNoUpgrade 기능 세트를 활성화하고 선택한 플랫폼 Operator를 설치하는 데 사용됩니다.

    중요

    platform Operator가 성공적으로 설치되지 않으면 클러스터 설치 프로세스가 차단됩니다.

검증

  1. 다음 명령을 실행하여 service-mesh-po 플랫폼 Operator의 상태를 확인합니다.

    $ oc get platformoperator service-mesh-po -o yaml

    출력 예

    ...
    status:
      activeBundleDeployment:
        name: service-mesh-po
      conditions:
      - lastTransitionTime: "2022-10-24T17:24:40Z"
        message: Successfully applied the service-mesh-po BundleDeployment resource
        reason: InstallSuccessful
        status: "True" 1
        type: Installed

    1
    Installed 상태 조건이 True 를 보고할 때까지 기다립니다.
  2. platform-operators-aggregated 클러스터 Operator에서 Available=True 상태를 보고하는지 확인합니다.

    $ oc get clusteroperator platform-operators-aggregated -o yaml

    출력 예

    ...
    status:
      conditions:
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        message: All platform operators are in a successful state
        reason: AsExpected
        status: "False"
        type: Progressing
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        status: "False"
        type: Degraded
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        message: All platform operators are in a successful state
        reason: AsExpected
        status: "True"
        type: Available

4.12.4. 클러스터 생성 후 플랫폼 Operator 설치

클러스터 관리자는 클러스터 전체 PlatformOperator API를 사용하여 TechPreviewNoUpgrades 기능을 활성화한 클러스터에 클러스터 생성 후 platform Operator를 설치할 수 있습니다.

프로세스

  1. 지원되는 OLM 기반 Operator 세트에서 플랫폼 Operator를 선택합니다. 이 세트 목록 및 현재 제한 사항에 대한 자세한 내용은 "플랫 플랫폼 Operator에 대한 프리뷰 제한 기술"을 참조하십시오.
  2. 선택한 플랫폼 Operator에 대한 PlatformOperator 오브젝트 YAML 파일을 생성합니다(예: Red Hat OpenShift Service Mesh Operator의 service-mesh-po.yaml 파일).

    sevice-mesh-po.yaml 파일 예

    apiVersion: platform.openshift.io/v1alpha1
    kind: PlatformOperator
    metadata:
      name: service-mesh-po
    spec:
      package:
        name: servicemeshoperator

  3. 다음 명령을 실행하여 PlatformOperator 오브젝트를 생성합니다.

    $ oc apply -f service-mesh-po.yaml
    참고

    클러스터에 TechPreviewNoUpgrades 기능 세트가 활성화되어 있지 않으면 오브젝트 생성이 다음 메시지와 함께 실패합니다.

    error: resource mapping not found for name: "service-mesh-po" namespace: "" from "service-mesh-po.yaml": no matches for kind "PlatformOperator" in version "platform.openshift.io/v1alpha1"
    ensure CRDs are installed first

검증

  1. 다음 명령을 실행하여 service-mesh-po 플랫폼 Operator의 상태를 확인합니다.

    $ oc get platformoperator service-mesh-po -o yaml

    출력 예

    ...
    status:
      activeBundleDeployment:
        name: service-mesh-po
      conditions:
      - lastTransitionTime: "2022-10-24T17:24:40Z"
        message: Successfully applied the service-mesh-po BundleDeployment resource
        reason: InstallSuccessful
        status: "True" 1
        type: Installed

    1
    Installed 상태 조건이 True 를 보고할 때까지 기다립니다.
  2. platform-operators-aggregated 클러스터 Operator에서 Available=True 상태를 보고하는지 확인합니다.

    $ oc get clusteroperator platform-operators-aggregated -o yaml

    출력 예

    ...
    status:
      conditions:
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        message: All platform operators are in a successful state
        reason: AsExpected
        status: "False"
        type: Progressing
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        status: "False"
        type: Degraded
      - lastTransitionTime: "2022-10-24T17:43:26Z"
        message: All platform operators are in a successful state
        reason: AsExpected
        status: "True"
        type: Available

4.12.5. 플랫폼 Operator 삭제

클러스터 관리자는 기존 플랫폼 Operator를 삭제할 수 있습니다. OLM(Operator Lifecycle Manager)은 cascading 삭제를 수행합니다. 먼저 OLM은 platform Operator에 대한 bundle 배포를 제거한 다음 registry+v1 유형 번들에서 참조하는 모든 오브젝트를 삭제합니다.

참고

platform Operator 관리자 및 번들 배포 프로비저너는 번들에서 참조되지만 나중에 번들 워크로드 자체에서 배포한 오브젝트는 관리하지 않습니다. 예를 들어 번들 워크로드에서 네임스페이스를 생성하고 Operator가 제거되기 전에 Operator를 정리하도록 구성되지 않은 경우 플랫폼 Operator 삭제 중에 네임스페이스를 제거하기 위해 OLM 범위를 벗어납니다.

절차

  1. 설치된 플랫폼 Operator 목록을 가져와서 삭제할 Operator의 이름을 찾습니다.

    $ oc get platformoperator
  2. 선택한 Operator의 PlatformOperator 리소스를 삭제합니다(예: Quay Operator).

    $ oc delete platformoperator quay-operator

    출력 예

    platformoperator.platform.openshift.io "quay-operator" deleted

검증

  1. (예: Quay Operator의 경우) platform Operator의 네임스페이스가 결국 삭제되었는지 확인합니다.

    $ oc get ns quay-operator-system

    출력 예

    Error from server (NotFound): namespaces "quay-operator-system" not found

  2. platform-operators-aggregated 클러스터 Operator가 Available=True 상태를 계속 보고하는지 확인합니다.

    $ oc get co platform-operators-aggregated

    출력 예

    NAME                            VERSION     AVAILABLE   PROGRESSING   DEGRADED   SINCE   MESSAGE
    platform-operators-aggregated   4.12.0-0    True        False         False      70s