gardener / etcd-backup-restore

Collection of components to backup and restore the etcd of a Kubernetes cluster.
Apache License 2.0
286 stars 100 forks source link

[Feature] Backup already existing etcd cluster #783

Open jurim76 opened 1 week ago

jurim76 commented 1 week ago

Is it possible to use "etcdbrct snapshot" to backup already existing etcd cluster, using etcdbrctl pod's hostPath and hostNetwork? etcdbrctl pod example manifest

apiVersion: v1
kind: Pod
metadata:
  labels:
    owner_team: ops-devops
  name: etcd-backup
spec:
  imagePullSecrets:
    - name: regcred
  containers:
  - image: local.reg/etcd-backup:latest
    name: etcd-backup
    volumeMounts:
    - name: etcd-certs
      mountPath: /etc/kubernetes/pki/etcd
      readOnly: true
    - name: data
      mountPath: /data
  tolerations:
  - effect: NoSchedule
    operator: Exists
  hostNetwork: true
  volumes:
  - name: etcd-certs
    hostPath:
      path: /etc/kubernetes/pki/etcd
      type: DirectoryOrCreate
  - name: data
    emptyDir: {}
renormalize commented 1 week ago

@jurim76

etcd-backup-restore is its current form is not capable of backing up an already existing etcd cluster. It is designed to act as a sidecar to an etcd container; and is typically used with etcd-wrapper.

The maintainers do see the value in future versions of etcd-backup-restore being able to be deployed standalone so that it can start backing up already existing etcd clusters. There are plans among the maintainers to introduce this functionality some time in the future. There is no roadmap for this currently.

renormalize commented 1 week ago

@jurim76 I would recommend you take at #725, which contains information that might be relevant to you. We've unfortunately not been able to get all of this information into the docs yet.