Skip to main content
Skip table of contents

Velero with Google Cloud Storage Buckets - Prepare your Environment


Set Environment Variables

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

    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:

    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:

    export CLUSTER_NAME=<target_cluster>

Prepare your Google Credentials

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

See 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>

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

    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.