15.2.4. Lifecycle Agent를 사용하여 이미지 기반 업그레이드에 대한 ConfigMap 오브젝트 생성


Lifecycle Agent에는 이미지 기반 업그레이드를 위해 해당 리소스를 처리하기 위해 ConfigMap 오브젝트로 래핑된 모든 OADP 리소스, 추가 매니페스트 및 사용자 정의 카탈로그 소스가 필요합니다.

업그레이드 중에 리소스를 백업하고 복원하는 데 사용되는 OADP 리소스를 생성합니다.

사전 요구 사항

  • 호환되는 시드 클러스터에서 시드 이미지를 생성합니다.
  • OADP 백업을 생성하고 리소스를 복원합니다.
  • stateroots 간에 공유되는 컨테이너 이미지의 대상 클러스터에 별도의 파티션을 만듭니다. 자세한 내용은 "이미지 기반 업그레이드에 대한 공유 컨테이너 파티션 구성"을 참조하십시오.
  • 시드 이미지와 함께 사용되는 버전과 호환되는 Lifecycle Agent 버전을 배포합니다.
  • OADP Operator, DataProtectionApplication CR 및 대상 클러스터에 시크릿을 설치합니다.
  • 적절한 인증 정보가 구성된 S3 호환 스토리지 솔루션 및 즉시 사용 가능한 버킷을 생성합니다. 자세한 내용은 "OADP 설치 제외"를 참조하십시오.

프로세스

  1. OADP Operator가 설치된 동일한 네임스페이스에서 플랫폼 아티팩트에 대한 OADP BackupRestore CR을 openshift-adp.

    1. 대상 클러스터가 RHACM에서 관리하는 경우 다음 YAML 파일을 추가하여 RHACM 아티팩트를 백업 및 복원합니다.

      PlatformBackupRestore.yaml for RHACM

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        name: acm-klusterlet
        annotations:
          lca.openshift.io/apply-label: "apps/v1/deployments/open-cluster-management-agent/klusterlet,v1/secrets/open-cluster-management-agent/bootstrap-hub-kubeconfig,rbac.authorization.k8s.io/v1/clusterroles/klusterlet,v1/serviceaccounts/open-cluster-management-agent/klusterlet,scheduling.k8s.io/v1/priorityclasses/klusterlet-critical,rbac.authorization.k8s.io/v1/clusterroles/open-cluster-management:klusterlet-admin-aggregate-clusterrole,rbac.authorization.k8s.io/v1/clusterrolebindings/klusterlet,operator.open-cluster-management.io/v1/klusterlets/klusterlet,apiextensions.k8s.io/v1/customresourcedefinitions/klusterlets.operator.open-cluster-management.io,v1/secrets/open-cluster-management-agent/open-cluster-management-image-pull-credentials" 
      1
      
        labels:
          velero.io/storage-location: default
        namespace: openshift-adp
      spec:
        includedNamespaces:
        - open-cluster-management-agent
        includedClusterScopedResources:
        - klusterlets.operator.open-cluster-management.io
        - clusterroles.rbac.authorization.k8s.io
        - clusterrolebindings.rbac.authorization.k8s.io
        - priorityclasses.scheduling.k8s.io
        includedNamespaceScopedResources:
        - deployments
        - serviceaccounts
        - secrets
        excludedNamespaceScopedResources: []
      ---
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
        name: acm-klusterlet
        namespace: openshift-adp
        labels:
          velero.io/storage-location: default
        annotations:
          lca.openshift.io/apply-wave: "1"
      spec:
        backupName:
          acm-klusterlet

      1
      다중 클러스터Hub CR에 .spec.imagePullSecret 이 정의되어 있지 않고 허브 클러스터의 open-cluster-management-agent 네임스페이스에 보안이 존재하지 않는 경우 v1/secrets/open-cluster-management-agent/open-cluster-management-image-pull-credentials.
    2. LVM 스토리지를 통해 클러스터에 영구 볼륨을 생성한 경우 LVM 스토리지 아티팩트에 대해 다음 YAML 파일을 추가합니다.

      PlatformBackupRestoreLvms.yaml for LVM Storage

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        labels:
          velero.io/storage-location: default
        name: lvmcluster
        namespace: openshift-adp
      spec:
        includedNamespaces:
          - openshift-storage
        includedNamespaceScopedResources:
          - lvmclusters
          - lvmvolumegroups
          - lvmvolumegroupnodestatuses
      ---
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
        name: lvmcluster
        namespace: openshift-adp
        labels:
          velero.io/storage-location: default
        annotations:
          lca.openshift.io/apply-wave: "2" 
      1
      
      spec:
        backupName:
          lvmcluster

      1
      lca.openshift.io/apply- ECDSA 값은 애플리케이션 Restore CR에 지정된 값보다 작아야 합니다.
  2. 업그레이드 후 애플리케이션을 복원해야 하는 경우 openshift-adp 네임스페이스에서 애플리케이션의 OADP BackupRestore CR을 생성합니다.

    1. openshift-adp 네임스페이스에서 클러스터 범위 애플리케이션 아티팩트에 대한 OADP CR을 생성합니다.

      LSO 및 LVM 스토리지의 클러스터 범위 애플리케이션 아티팩트에 대한 OADP CR의 예

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        annotations:
          lca.openshift.io/apply-label: "apiextensions.k8s.io/v1/customresourcedefinitions/test.example.com,security.openshift.io/v1/securitycontextconstraints/test,rbac.authorization.k8s.io/v1/clusterroles/test-role,rbac.authorization.k8s.io/v1/clusterrolebindings/system:openshift:scc:test" 
      1
      
        name: backup-app-cluster-resources
        labels:
          velero.io/storage-location: default
        namespace: openshift-adp
      spec:
        includedClusterScopedResources:
        - customresourcedefinitions
        - securitycontextconstraints
        - clusterrolebindings
        - clusterroles
        excludedClusterScopedResources:
        - Namespace
      ---
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
        name: test-app-cluster-resources
        namespace: openshift-adp
        labels:
          velero.io/storage-location: default
        annotations:
          lca.openshift.io/apply-wave: "3" 
      2
      
      spec:
        backupName:
          backup-app-cluster-resources

      1
      예제 리소스 이름을 실제 리소스로 바꿉니다.
      2
      lca.openshift.io/apply- Cryostat 값은 플랫폼 Restore CR의 값보다 크고 애플리케이션 네임스페이스 범위 Restore CR의 값보다 작아야 합니다.
    2. 네임스페이스 범위 애플리케이션 아티팩트에 대한 OADP CR을 생성합니다.

      LSO를 사용할 때 OADP CR의 네임스페이스 범위 애플리케이션 아티팩트의 예

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        labels:
          velero.io/storage-location: default
        name: backup-app
        namespace: openshift-adp
      spec:
        includedNamespaces:
        - test
        includedNamespaceScopedResources:
        - secrets
        - persistentvolumeclaims
        - deployments
        - statefulsets
        - configmaps
        - cronjobs
        - services
        - job
        - poddisruptionbudgets
        - <application_custom_resources> 
      1
      
        excludedClusterScopedResources:
        - persistentVolumes
      ---
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
        name: test-app
        namespace: openshift-adp
        labels:
          velero.io/storage-location: default
        annotations:
          lca.openshift.io/apply-wave: "4"
      spec:
        backupName:
          backup-app

      1
      애플리케이션에 대한 사용자 정의 리소스를 정의합니다.

      LVM 스토리지를 사용할 때 OADP CR의 네임스페이스 범위 애플리케이션 아티팩트의 예

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        labels:
          velero.io/storage-location: default
        name: backup-app
        namespace: openshift-adp
      spec:
        includedNamespaces:
        - test
        includedNamespaceScopedResources:
        - secrets
        - persistentvolumeclaims
        - deployments
        - statefulsets
        - configmaps
        - cronjobs
        - services
        - job
        - poddisruptionbudgets
        - <application_custom_resources> 
      1
      
        includedClusterScopedResources:
        - persistentVolumes 
      2
      
        - logicalvolumes.topolvm.io 
      3
      
        - volumesnapshotcontents 
      4
      
      ---
      apiVersion: velero.io/v1
      kind: Restore
      metadata:
        name: test-app
        namespace: openshift-adp
        labels:
          velero.io/storage-location: default
        annotations:
          lca.openshift.io/apply-wave: "4"
      spec:
        backupName:
          backup-app
        restorePVs: true
        restoreStatus:
          includedResources:
          - logicalvolumes 
      5

      1
      애플리케이션에 대한 사용자 정의 리소스를 정의합니다.
      2
      필수 필드입니다.
      3
      필수 필드
      4
      LVM 스토리지 볼륨 스냅샷을 사용하는 경우 선택 사항입니다.
      5
      필수 필드입니다.
      중요

      동일한 버전의 애플리케이션이 OpenShift Container Platform의 현재 릴리스와 대상 릴리스에서 작동해야 합니다.

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

    $ oc create configmap oadp-cm-example --from-file=example-oadp-resources.yaml=<path_to_oadp_crs> -n openshift-adp
  4. 다음 명령을 실행하여 ImageBasedUpgrade CR을 패치합니다.

    $ oc patch imagebasedupgrades.lca.openshift.io upgrade \
      -p='{"spec": {"oadpContent": [{"name": "oadp-cm-example", "namespace": "openshift-adp"}]}}' \
      --type=merge -n openshift-lifecycle-agent
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

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

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동