How to back up the cluster with ETCDCTL from a regular node inteas of a master in kubernetes

5/4/2021

There is no clear information about how to make a backup and restore from a regular node like node01 for instance, I mean:

But how about in the cert exam, you are operating most of the time from a regular node01, the config files are not the same? Can some one elaborate?

Thanks

-- user9356263
etcd
kubernetes

1 Answer

5/5/2021

It is impossible to backup cluster from a regular node using etcd. The etcd can only be run on a master node.

But you can backup your Kubernetes cluster by command: etcdctl backup. Here you can find completely guide, how to use etcdctl backup command.

Another way is making a snapshot of your cluster by command: etcdctl snapshot save.

This command will let you create incremental backup.

Incremental backup of etcd, where full snapshot is taken first and then we apply watch and persist the logs accumulated over certain period to snapshot store. Restore process, restores from the full snapshot, start the embedded etcd and apply the logged events one by one.

You can find more about incremental backup function here.

-- Mikołaj Głodziak
Source: StackOverflow