Skip to content

Instantly share code, notes, and snippets.

@tioxy
Created March 31, 2019 23:42
Show Gist options
  • Save tioxy/d5ac10ca8b947b74f15ba0c6bdaf1290 to your computer and use it in GitHub Desktop.
Save tioxy/d5ac10ca8b947b74f15ba0c6bdaf1290 to your computer and use it in GitHub Desktop.
Deploying Velero for a Kubernetes cluster hosted in AWS
# Deploying Velero for a Kubernetes cluster hosted in AWS
# For in depth details, check https://heptio.github.io/velero/master/aws-config.html
export VELERO_FOLDER=/opt/velero
export BUCKET_NAME=k8s-cluster-velero # Use a different name
export CLOUD_REGION=us-east-1
kubectl create secret generic cloud-credentials \
--namespace velero \
--from-file cloud=$VELERO_FOLDER/credentials-velero
sed -e "s/<YOUR_BUCKET>/${BUCKET_NAME}/g" \
-e "s/<YOUR_REGION>/${CLOUD_REGION}/g" \
-i $VELERO_FOLDER/config/aws/05-backupstoragelocation.yaml
sed -e "s/<YOUR_REGION>/${CLOUD_REGION}/g" \
-i $VELERO_FOLDER/config/aws/06-volumesnapshotlocation.yaml
kubectl apply -f $VELERO_FOLDER/config/aws/05-backupstoragelocation.yaml
kubectl apply -f $VELERO_FOLDER/config/aws/06-volumesnapshotlocation.yaml
kubectl apply -f $VELERO_FOLDER/config/aws/10-deployment.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment