簡介
本文實作練習中,將在 GKE Cluster 運作環境中,採用內建支援的「Backup for GKE」服務,這項服務由兩個部份所組成,分別是 Google Cloud API 及 GKE Add-on (the Backup for GKE agent)。簡單來說,就是可以針對 GKE Cluster 中的工作負載進行「備份和還原」作業。
圖、Backup for GKE 元件運作示意圖
Task 9 - Restore a backup
請切換到 Cloud Shell 頁面中,執行下列指令將先前建立的 GKE
備份計劃進行還原的動作。當還原的工作任務完成後,將會出現「Restore completed. Restore state: SUCCEEDED」資訊,表示還原完成,然後請執行「kubectl get pods」指令進行確認:
gcloud beta container backup-restore restores create my-restore1 \
--project=$PROJECT_ID \
--location=$REGION \
--restore-plan=my-restore-plan1 \
--backup=projects/${PROJECT_ID}/locations/${REGION}/backupPlans/${BACKUP_PLAN}/backups/my-backup1 \
--wait-for-completion
最後,別忘了檢查是否每個 Task 工作任務都完成,再關閉這個 Cloud Lab 哦!
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