This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAMESPACE=mainnet-replica-0-4-13 | |
kubectl scale sts l2geth-replica --replicas=0 -n $NAMESPACE | |
PV=$(kubectl get pvc -n $NAMESPACE l2geth-replica-data -o jsonpath='{.spec.volumeName}') | |
GCLOUD_DISK=$(kubectl get pv $PV -o jsonpath='{.spec.gcePersistentDisk.pdName}') | |
SLUG=$NAMESPACE-$(date +%s) | |
gcloud compute disks snapshot $GCLOUD_DISK --snapshot-names=$SLUG --zone=us-central1-c | |
kubectl scale sts l2geth-replica --replicas=1 -n $NAMESPACE | |
gcloud compute disks create $SLUG --source-snapshot=$SLUG --type=pd-ssd --size=200 --zone us-central1-c |
OlderNewer