Kubernetes: Configuration snapshoting

5/31/2018

Is there any configuration snapshot mechanism on kubernetes?

The goal is to take a snapshot of all deployments/services/config-maps etc and apply them to a kubernetes cluster.

The steps that should be taken.

  • Take a configuration snapshot
  • Delete the cluster
  • Create a new cluster
  • Apply the configuration snapshot to the new cluster
  • New cluster works like the old one
-- gkatzioura
kubernetes

2 Answers

6/1/2018

State of the kubernetes is stored on etcd, so back up etcd data and restore would be able to restore cluster. But this would not backup any information stored in persistent volumes, that needs to be handled separately.

backup operater provided by coreos is a good option:

Taking backups with etcdctl :

Heptio ark has capability to backup config and also volumes :

if you want a UI based option, these would be good :

-- Amila Kumaranayaka
Source: StackOverflow

6/1/2018

These are the 3 that spring to mind, with kubed being, at least according to their readme, the closest to your stated goals:

I run Ark in my cluster, but (to my discredit) I have not yet attempted to do a D.R. drill using it; I only checked that it is, in fact, making config backups.

-- mdaniel
Source: StackOverflow