ページの先頭行へ戻る
Enterprise Postgres 15 SP1 オペレーターユーザーズガイド

4.13.3 ホットスタンバイ構成の定義

ホットスタンバイ構成の継続的リカバリ方式およびストリーミングレプリケーション方式の配備手順を説明します。

4.13.3.1 継続的リカバリ方式の定義

本番環境のFEPClusterのカスタムリソース定義には、ホットスタンバイ構成のみで使用するパラメタなどは存在しません。継続的リカバリ方式を利用する場合には、災害対策環境でのFEPClusterのカスタムリソースを下記のように定義します。

apiVersion: fep.fujitsu.io/v2
kind: FEPCluster
metadata:
 …
spec:
  fep:
    standby:
      enable: true
      method: archive-recovery
      pgBackrestConf: |
        [global]
        log-path=/database/log/backup
        repo1-type=azure
        repo1-path=< Backup path of primary/ cluster from which data is to be restored>
        repo1-azure-account=<my storage account>
        repo1-azure-container=fepbackups
        repo1-azure-key=<my storage account key >
…

4.13.3.2 ストリーミングレプリケーション方式の定義

ストリーミングレプリケーション方式を利用する場合は、下記のように定義します。

apiVersion: fep.fujitsu.io/v2
kind: FEPCluster
metadata:
...
spec:
  fep:
    standby:
      enable: true
      method: streaming
      streaming:
        host: <LoadBalancer IP>
        port: 27500
      pgBackrestConf: |
        [global]
        log-path=/database/log/backup
        repo1-type=azure
        repo1-path=< Backup path of primary/ cluster from which data is to be restored>
        repo1-azure-account=<my storage account>
        repo1-azure-container=fepbackups
        repo1-azure-key=<my storage account key >
...

ストリーミングレプリケーションでは、FEPClusterCRを上記のように定義しますが、別途LoadBalancerを配備する必要があります。

kind: Service
apiVersion: v1
metadata:
  name: my-fep-internal-svc
  namespace: sample-namespace
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-internal: 'true'
spec:
  ports:
    - protocol: TCP
      port: 27500
  type: LoadBalancer
  selector:
    app: <my-fep-cluster>-sts
    feprole: master