Skip to main content
Skip table of contents

Velero with Google Cloud Storage Buckets - Prepare your Environment

Prerequisites

Set Environment Variables

  • Set the BUCKET environment variable to the name of the GCS container you want to use as backup storage:

    CODE
    export BUCKET=<GCS-bucket-name>
  • Set the WORKSPACE_NAMESPACE environment variable to the name of the workspace’s namespace. Replace <workspace_namespace> with the name of the target workspace:

    CODE
    export WORKSPACE_NAMESPACE=<workspace_namespace>

    (info) This can be the kommander namespace for the Management cluster or any other additional workspace namespace for Attached or Managed clusters. To list all available workspace namespaces, use the kubectl get kommandercluster -A command.

  • Set the CLUSTER_NAME environment variable. Replace <target_cluster> with the name of the cluster where you want to set up Velero:

    CODE
    export CLUSTER_NAME=<target_cluster>

Prepare your Google Credentials

You can store your backups in Google Cloud Platform/GCS buckets.

See https://cloud.google.com/storage/docs/creating-buckets#required-roles for more information on setting up access to your bucket.

  1. Create a credentials-velero file with the information required to create a secret.
    (info) Replace <service-account-email> with the email address you used to grant permissions to your bucket. The address usually follows the format <service-account-user>@<gcp-project>.iam.gserviceaccount.com.

    CODE
    gcloud iam service-accounts keys create credentials-velero \
        --iam-account <service-account-email>
  2. Use the credentials-velero file to create the secret:

    CODE
    kubectl create secret generic -n ${WORKSPACE_NAMESPACE} velero-gcp-credentials --from-file=gcp=credentials-velero --kubeconfig=${CLUSTER_NAME}.conf

Next Step:

Velero with Google Cloud Storage Buckets - Configure Velero

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.