gke - enabling backup and restore

In GKE we can easily enable backup by running the following script 

gcloud container clusters update ${KUBERNETES_CLUSTER_PREFIX}-cluster \

    --project=${PROJECT_ID} \
    --location=${REGION} \
    --update-addons=BackupRestore=ENABLED

This taskes about 5 min to complete.

Then setup a backup plan

gcloud beta container backup-restore backup-plans create ${KUBERNETES_CLUSTER_PREFIX}-cluster-backup \

    --project=${PROJECT_ID} \
    --location=${REGION} \
    --cluster="projects/${PROJECT_ID}/locations/${REGION}/clusters/${KUBERNETES_CLUSTER_PREFIX}-cluster" \
    --all-namespaces \
    --include-secrets \
    --include-volume-data \
    --cron-schedule="0 3 * * *" \
    --backup-retain-days=3

 And then you can see the backup plan created for your cluster 




Comments

Popular posts from this blog

gemini cli getting file not defined error

NodeJS: Error: spawn EINVAL in window for node version 20.20 and 18.20

vllm : Failed to infer device type