5.22.3. OADP を使用した 3scale API Management の復元


バックアップ済みの 3scale オペレーターリソース、MySQL データベース、および Redis データベースを復元することにより、Red Hat 3scale API 管理コンポーネントを復元します。これにより、3scale のデプロイメントを復旧し、API 管理サービスを再開できます。

データが復元されたら、3scale Operator とデプロイメントをスケールアップできます。

5.22.3.1. 3scale API Management Operator、シークレット、APIManager の復元

シークレット および APIManager カスタムリソース (CR) を含む、Red Hat 3scale API Management オペレーターリソースを復元します。これにより、同じクラスターまたは別のクラスター上で 3scale オペレーターの設定を復元できます。

前提条件

  • 3scale Operator をバックアップした。
  • MySQL および Redis データベースをバックアップした。
  • バックアップされたのと同じクラスター上でデータベースを復元しようとしている。

    バックアップ元とは異なるクラスターに Operator を復元する場合は、復元先のクラスターで nodeAgent を有効にして OADP をインストールして設定します。OADP の設定がソースクラスターと同じであることを確認してください。

手順

  1. 次のコマンドを実行して、3scale Operator のカスタムリソース定義 (CRD) と threescale namespace を削除します。

    $ oc delete project threescale
    "threescale" project deleted successfully
  2. 3scale Operator を復元するために、次の設定を含む YAML ファイルを作成します。

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-installation-restore
      namespace: openshift-adp
    spec:
      backupName: operator-install-backup
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    ここでは、以下のようになります。

    オペレーターのインストールバックアップ
    3scale オペレーターを復元するためのバックアップの名前を指定します。
  3. 次のコマンドを実行して、3scale Operator を復元します。

    $ oc create -f restore.yaml
    restore.velerio.io/operator-installation-restore created
  4. 次のコマンドを実行して、s3-credentials Secret オブジェクトを手動で作成します。

    $ oc apply -f - <<EOF
    ---
    apiVersion: v1
    kind: Secret
    metadata:
          name: s3-credentials
          namespace: threescale
    stringData:
      AWS_ACCESS_KEY_ID: <ID_123456>
      AWS_SECRET_ACCESS_KEY: <ID_98765544>
      AWS_BUCKET: <mybucket.example.com>
      AWS_REGION: <us-east-1>
    type: Opaque
    EOF

    ここでは、以下のようになります。

    <AWS_ACCESS_KEY_ID>
    AWS 認証情報 ID を指定します。
    <AWS_SECRET_ACCESS_KEY>
    AWS 認証情報のキーを指定します。
    <mybucket.example.com>
    ターゲットバケット名を指定します。
    <us-east-1>
    バケットの AWS リージョンを指定します。
  5. 次のコマンドを実行して、3scale Operator をスケールダウンします。

    $ oc scale deployment threescale-operator-controller-manager-v2 --replicas=0 -n threescale
    deployment.apps/threescale-operator-controller-manager-v2 scaled
  6. Secret を復元するために、次の設定を含む YAML ファイルを作成します。

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-resources-secrets
      namespace: openshift-adp
    spec:
      backupName: operator-resources-secrets
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    ここでは、以下のようになります。

    オペレーターリソースシークレット
    シークレット を復元するバックアップの名前を指定します。
  7. 次のコマンドを実行して、Secret を復元します。

    $ oc create -f restore-secrets.yaml
    restore.velerio.io/operator-resources-secrets created
  8. APIManager を復元するために、次の設定を含む YAML ファイルを作成します。

    restore-apimanager.yaml ファイルの例

    apiVersion: velero.io/v1
    kind: Restore
    metadata:
      name: operator-resources-apim
      namespace: openshift-adp
    spec:
      backupName: operator-resources-apim
      excludedResources:
      - nodes
      - events
      - events.events.k8s.io
      - backups.velero.io
      - restores.velero.io
      - resticrepositories.velero.io
      - csinodes.storage.k8s.io
      - volumeattachments.storage.k8s.io
      - backuprepositories.velero.io
      itemOperationTimeout: 4h0m0s

    ここでは、以下のようになります。

    オペレーターリソース APIM
    APIManager を復元するバックアップの名前を指定します。
    excludedResources
    復元したくないリソースを指定します。
  9. 次のコマンドを実行して、APIManager を復元します。

    $ oc create -f restore-apimanager.yaml
    restore.velerio.io/operator-resources-apim created
  10. 次のコマンドを実行して、3scale Operator をスケールアップします。

    $ oc scale deployment threescale-operator-controller-manager-v2 --replicas=1 -n threescale
    deployment.apps/threescale-operator-controller-manager-v2 scaled
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る