Skip to content

Instantly share code, notes, and snippets.

@caruccio
caruccio / migrate-pv-to-zone.sh
Last active April 17, 2024 20:13
Migrate EBS Volume based PVs across AWS availability zones
#!/bin/bash
if [ $# -lt 6 ]; then
echo "Usage: $0 [source-namespace] [source-pvc-name] [target-namespace] [target-pvc-name] [target-aws-zone] [target-pv-name] [kind/workload=None]"
echo "Clone EBS, PV and PVC from source to target. Will stop kind/workload if defined."
exit
fi
set -eu