5

At the moment I have a Kubernetes cluster distributed on AWS via kops. I have a doubt: is it possible to make a sort of snapshot of the Kubernetes cluster and recreate the same environment (master and pod nodes), for example to be resilient or to migrate the cluster in an easy way? I know that the Heptio Ark exists, it is very beautiful. But I'm curious to know if there is an easy way to do it. For example, is it enough to back up Etcd (or in my case the snapshot of EBS volumes)?

Thanks a lot. All suggestions are welcome

falberto89
  • 163
  • 9

2 Answers2

4

kops stores its state in an S3 bucket identified by the KOPS_STATE_STORE. So yes, if your cluster has been removed you can restore it by running kops create cluster.

Keep in mind that it doesn't restore your etcd state so for that you are going to set up etcd backups. You could also make use of Heptio Ark.

Similar answers to this topic:

Recover kops Kubernetes cluster

How to restore kubernetes cluster using kops?

Rico
  • 58,485
  • 12
  • 111
  • 141
  • Thanks for the reply and for the links. Actually I had already read both the links. I knew about this feature of kops and obviously I know the importance of backups of etcd. I wonder if, for example, it is possible to recreate the old environment in a new cluster, for example through Etcd backups. Could I, thanks to the knowledge of the previous state of Etcd, repopulate the worker nodes of the new cluster with the same pods, service, etc? What do you think about it? – falberto89 Oct 12 '18 at 20:16
0

As mentioned by Rico in the earlier post, you can use Velero to back up your etcd using cli client. Another option to consider for the scenario you described is CAPE: CAPE provides an easy to use control plane for Kubernetes Multi-cluster App & Data Management via a friendly user interface.

See below for resources:

How to create an on-demand K8s Backup: https://www.youtube.com/watch?v=MOPtRTeG8sw&list=PLByzHLEsOQEB01EIybmgfcrBMO6WNFYZL&index=7

How to Restore/Migrate K8s Backup to Another Cluster: https://www.youtube.com/watch?v=dhBnUgfTsh4&list=PLByzHLEsOQEB01EIybmgfcrBMO6WNFYZL&index=10

Kim
  • 1