I am looking to understand things regarding Google Kubernetes Cluster backup . I came across this document but this seems to be more on GCP Anthos On premises GKE Cluster .
https://cloud.google.com/anthos/gke/docs/on-prem/archive/1.1/how-to/administration/backing-up
I saw few blogs talking of a GKE feature to create a clone of existing GKE Cluster but I cannot find any option in GCP Console to create new cluster by cloning an existing GKE Cluster.
https://blog.doit-intl.com/google-kubernetes-engine-cluster-migration-with-velero-4a140b018f32
Can somebody please confirm if this cloning feature is still available in GKE or it is deprecated ?
Apart from Cloning a GKE Cluster , we need to take backup of Cluster resources and PersistentVolumes. It seems Veloro is a useful tool for this and it is GKE aware.
I am looking for further suggestions regarding GKE Cluster backup which takes care of both Cluster resources and persistent volumes. Any recommendation/best practises from Google on GKE backup
As to creating a new GKE cluster from the existing one as its clone, it looks like this option is still available but was moved to differnt section. Now it is available in cluster details (when you click on your cluster name) and is called
DUPLICATE
:Creating cluster from templates in general has been removed from cloud console. You can read about it here:
When we talk about backing up kubernetes cluster we need to keep in mind the basic distinction. One thing is backing up the cluster itself and another one is backing up it's workloads or resources deployed to it.
As for now there is no single tool which enables us to perform both operations altogether, at least not on managed kubernetes solutions such as GKE. Of course there are completely different possibilities of performing full backup of your cluster when it comes to on-premise kubernetes installation e.g. disk snapshots.
Velero (formerly known as Heptio Ark) is a great tool that enables you to back up and restore your Kubernetes cluster resources as well as persistent volumes. And it can be used with any public cloud provider or on-premises k8s installation.
However as you can read in Cluster Migration description there is one caveat when migrating persistent volumes between different cloud providers:
As you can see it still can be done with the help of restic. However if you migrate workloads deployed on GKE to another GKE cluster, you don't need it.
As to backing up or cloning an existing GKE cluster (cluster itself, not its workload), an interesting approach is to save it as a code which can be used to easily re-create it later. You can use Infrastructure as Code tool such as terraform and it's import option.