Skip to content

Configuring Rancher Backup to use GCP Cloud Storage as Remote Storage Location

Article Number: 000021206

Environment

A Rancher v2.5+ instance

Situation

Configuration of Google Cloud Storage as the S3 backend to store Rancher Backup Operator backups.

Resolution

To configure the Rancher Backup Operator with Google Cloud Storage, perform the following steps:

  1. Create a new bucket in Google Cloud Storage
  2. Create a GCP serviceaccount in IAM & Admin
  3. Give the GCP serviceaccount permissions to read, write, and delete objects in the bucket. The serviceaccount will require the roles/storage.objectAdmin role to read, write, and delete objects in the bucket.
  1. Navigate to your buckets in cloud storage and select your newly created bucket.
  2. Go to the cloud storage’s settings menu and navigate to the interoperability tab
  3. Scroll down to Service account HMAC and press + CREATE A KEY FOR A SERVICE ACCOUNT
  4. Select the GCP serviceaccount you created earlier and press CREATE KEY
  5. Save the Access Key and Secret.
  6. Create the credentials secret using the following documentation: https://ranchermanager.docs.rancher.com/reference-guides/backup-restore-configuration/backup-configuration#example-credentialsecret
  7. Install the Backup Operator with a default S3 storage location. The S3 storage location yaml looks like this:

      credentialSecretName: s3-creds
      credentialSecretNamespace: default
      bucketName: rancher-backups
      region: us
      endpoint: storage.googleapis.com