AlloyDB Omni mit den RPM-Orchestrator-Beispielen

Auf dieser Seite finden Sie verschiedene YAML-Konfigurationsbeispiele zum Bereitstellen und Verwalten von AlloyDB Omni mit dem RPM-Orchestrator.

DBCluster-Konfiguration

Minimaler DBCluster

Eine grundlegende Konfiguration für einen eigenständigen DBCluster.

YAML-Konfiguration für minimalen DBCluster ansehen

DBCluster:
  metadata:
    name: alloydb-prod
  spec:
    databaseVersion: 18.1.0
    primarySpec:
      adminUser:
        passwordRef:
          name: db-pw-alloydb-prod
      resources:
        disks:
        - name: DataDisk
          path: /mnt/disks/pgsql

Vollständiger DBCluster

Eine umfassende DBCluster-Konfiguration mit allen Optionen.

YAML-Konfiguration für vollständigen DBCluster ansehen

DBCluster:
  metadata:
    name: alloydb-prod
  spec:
    databaseVersion: 18.1.0
    loadBalancerPort: 5433
    readOnlyPort: 5434
    mode: ""
    availability:
      numberOfStandbys: 2
      enableAutoFailover: true
      enableAutoHeal: true
      enableStandbyAsReadReplica: true
      autoFailoverTriggerThreshold: 2
      autoHealTriggerThreshold: 2
      healthcheckPeriodSeconds: 10
    primarySpec:
      adminUser:
        passwordRef:
          name: db-pw-alloydb-prod
      port: 5432
      monitorPort: 9187
      parameters:
        max_connections: "100"
        max_wal_size: "2GB"
        max_worker_processes: "32"
        log_connections: "on"
        log_disconnections: "on"
        log_hostname: "on"
        log_statement: "none"
      resources:
        cpu: 16
        memory: 32Gi
        limits:
          memory: 64Gi
        disks:
        - name: DataDisk
          path: /mnt/disks/pgsql
        - name: ObsDisk
          path: /obs
      dbLoadBalancerOptions:
        onprem:
          loadBalancerIP: 10.1.0.95
          loadBalancerType: "internal"
          loadBalancerInterface: "eth0"
      features:
        columnarSpillToDisk:
          cacheSize: "50Gi"
          localVolume:
            path: "/mnt/disks/ssd1"
        ultraFastCache:
          cacheSize: "100Gi"
          localVolume:
            path: "/mnt/disks/ssd2"
        googleMLExtension:
          enabled: true
          config:
            vertexAIKeyRef: "vertex-ai-key"
            vertexAIRegion: "us-central1"

Secret-Konfiguration

Beispiel mit Passwort:

YAML-Konfiguration für Secret (Passwort) ansehen

Secret:
  metadata:
    name: db-pw-sample-st-1
  spec:
    type: Opaque
    data:
      sample-st-1: cG9zdGdyZXM=

Beispiel mit Zertifikaten:

YAML-Konfiguration für Secret (Zertifikate) ansehen

Secret:
  metadata:
    name: dbs-alloydbomni-cluster
  spec:
    type: Opaque
    data:
      ca.crt: <base64_ca_certificate>
      tls.crt: <base64_tls_certificate>
      tls.key: <base64_tls_private_key>

Beispiel für den Schlüssel der Gemini Enterprise Agent Platform:

YAML-Konfiguration für Secret (Vertex AI) ansehen

Secret:
  metadata:
    name: vertex-ai-key
  spec:
    type: Opaque
    data:
      private-key.json: <base64_encoded_private_key>

PgBouncer-Konfiguration

YAML-Konfiguration für PgBouncer ansehen

PgBouncer:
  metadata:
    name: sample-pgbouncer
  spec:
    accessMode: "rw"
    allowSuperUserAccess: true
    dbClusterRef: dbcluster-sample
    port: 6432

Geplanter Sicherungsplan

Vollständige und inkrementelle Sicherungen planen.

YAML-Konfiguration für geplanten Sicherungsplan ansehen

BackupPlan:
  metadata:
    name: sample-backupplan
  spec:
    dbclusterRef: sample-dbc
    backupRetainDays: 14
    paused: false
    backupSchedules:
      # Full backup at 00:00 on every Sunday.
      full: "0 0 * * 0"
      # Incremental backup at 21:00 every day.
      incremental: "0 21 * * *"
    backupLocation:
      type: GCS
      gcsOptions:
        bucket: sample-backup-bucket
        key: /backups
        secretRef:
          name: gcs-access-secret

Sicherung in Cloud Storage

Sicherungen in einem Cloud Storage-Bucket speichern.

YAML-Konfiguration für Sicherung in Cloud Storage ansehen

BackupPlan:
  metadata:
    name: sample-backupplan-gcs
  spec:
    dbclusterRef: sample-dbc
    backupRetainDays: 14
    paused: false
    backupSchedules:
      # Full backup at 00:00 every Sunday.
      full: "0 0 * * 0"
      # Incremental backup at every day at 21:00.
      incremental: "0 21 * * *"
    backupLocation:
      type: GCS
      gcsOptions:
        bucket: sample-backup-bucket
        key: /backups
        secretRef:
          name: gcs-access-secret

Sicherung in Amazon S3

Sicherungen in einem Amazon S3-kompatiblen Bucket speichern.

YAML-Konfiguration für Sicherung in Amazon S3 ansehen

BackupPlan:
  metadata:
    name: sample-backupplan-s3
  spec:
    dbclusterRef: sample-dbc
    backupRetainDays: 14
    paused: false
    backupSchedules:
      # Full backup at 00:00 on every Sunday.
      full: "0 0 * * 0"
      # Incremental backup at 21:00 every day.
      incremental: "0 21 * * *"
    backupLocation:
      type: S3
      s3Options:
        bucket: sample-backup-bucket-s3
        key: /backups
        region: "us-east-1"
        endpoint: "https://s3.storage.com"
        secretRef:
          name: s3-access-secret

Manuelle On-Demand-Sicherung

Eine einzelne manuelle Sicherung erstellen.

YAML-Konfiguration für manuelle On-Demand-Sicherung ansehen

Backup:
  metadata:
    name: sample-backup
  spec:
    dbclusterRef: sample-dbc
    backupPlanRef: sample-backupplan
    manual: true
    physicalBackupSpec:
      backupType: full

Aus einer Sicherung wiederherstellen

Einen Cluster aus einer gespeicherten Sicherung wiederherstellen oder erstellen.

YAML-Konfiguration für Wiederherstellung aus einer Sicherung ansehen

Restore:
  metadata:
    name: sample-restore
  spec:
    sourceDBCluster: sample-dbc
    backup: sample-backup

Wiederherstellung zu einem bestimmten Zeitpunkt

Einen Cluster zu einem bestimmten Zeitpunkt in der Vergangenheit wiederherstellen.

YAML-Konfiguration für Wiederherstellung zu einem bestimmten Zeitpunkt ansehen

Restore:
  metadata:
    name: sample-restore-pitr
  spec:
    sourceDBCluster: sample-dbc
    pointInTime: "2026-08-12T00:00:00Z"

Switchover-Konfiguration

Beispiel für eine Switchover-Konfiguration

YAML-Konfiguration für Switchover ansehen

Switchover:
  metadata:
    name: switchover-alloydb-prod-12345
  spec:
    dbclusterRef: "alloydb-prod"

Failover-Konfiguration

Beispiel für eine Failover-Konfiguration

YAML-Konfiguration für Failover ansehen

Failover:
  metadata:
    name: failover-alloydb-prod-abcde
  spec:
    dbclusterRef: "alloydb-prod"

DBInstance-Konfiguration

Beispiel für eine DBInstance-Konfiguration (Lesepool)

YAML-Konfiguration für DBInstance (Lesepool) ansehen

DBInstance:
  metadata:
    name: sample-readpool
  spec:
    instanceType: ReadPool
    dbcParent:
      name: alloydb-prod
    nodeCount: 2