Skip to main content
Skip table of contents

Velero with AWS S3 - Prepare your Environment

Prerequisites

Environment variables:

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

    CODE
    export BUCKET=<aws-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 workspaces and clusters, use the dkp get clusters -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 AWS Credentials

See the official docs for details on how to use IAM roles instead of static credentials.

  1. Create a file containing your static AWS credentials:
    In this example, the file’s name is credentials-velero.

    CODE
    cat << EOF > aws-credentials
      [default]
      aws_access_key_id=<REDACTED>
      aws_secret_access_key=<REDACTED>
    EOF
  2. Create a secret on the cluster where you are installing and configuring Velero by referencing the file created in the previous step. This can be the Management, a Managed or an Attached cluster:
    In this example, the secret’s name is velero-aws-credentials.

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

Next Step:

Velero with AWS S3 - Configure Velero

JavaScript errors detected

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

If this problem persists, please contact our support.