簡介
本文實作練習中,將在 GKE Cluster 運作環境中,採用內建支援的「Backup for GKE」服務,這項服務由兩個部份所組成,分別是 Google Cloud API 及 GKE Add-on (the Backup for GKE agent)。簡單來說,就是可以針對 GKE Cluster 中的工作負載進行「備份和還原」作業。
圖、Backup for GKE 元件運作示意圖
Task 8 - Plan a restore
請切換到 Cloud Shell 頁面中,執行下列指令以便建立 GKE
復原計劃,建立完成後會看到「Created restore plan [my-restore-plan1]」資訊,表示 GKE 復原計劃建立完成:
gcloud beta container backup-restore restore-plans create my-restore-plan1 \
--project=$PROJECT_ID \
--location=$REGION \
--backup-plan=projects/${PROJECT_ID}/locations/${REGION}/backupPlans/$BACKUP_PLAN \
--cluster=projects/${PROJECT_ID}/locations/${ZONE}/clusters/lab-cluster \
--namespaced-resource-restore-mode=delete-and-restore \
--volume-data-restore-policy=restore-volume-data-from-backup \
--all-namespaces
gcloud beta container backup-restore restore-plans list \
--project=$PROJECT_ID \
--location=$REGION
#####
gcloud beta container backup-restore restore-plans describe
my-restore-plan1 \
--project=$PROJECT_ID \
--location=$REGION
GKE Backup and Restore - 系列文章
- GKE Backup and Restore | GSP1110
- GKE Backup and Restore - Task1 | GSP1110
- GKE Backup and Restore - Task2 | GSP1110
- GKE Backup and Restore - Task3 | GSP1110
- GKE Backup and Restore - Task4 | GSP1110
- GKE Backup and Restore - Task5 | GSP1110
- GKE Backup and Restore - Task6 | GSP1110
- GKE Backup and Restore - Task7 | GSP1110
- (本文) GKE Backup and Restore - Task8 | GSP1110
- GKE Backup and Restore - Task9 | GSP1110