【问题标题】:Periodic backups of an etcd-operator clusteretcd-operator 集群的定期备份
【发布时间】:2018-07-08 11:00:14
【问题描述】:

我正在尝试使用 etcd-operator helm chart 在 GKE 上部署 etcd 集群。

我已经成功地让集群联机并正常工作,但现在我正试图弄清楚如何备份这个东西。如果我理解this issuethis issue,那么etcd-operator 是否真的不支持定期备份?

在我看来,如果您不能持续备份您的集群,那么包括备份和恢复操作员将毫无用处。

我是否误解了文档?其他人是如何解决这个问题的?

这是我目前正在使用的图表值:

rbac:
  create: false
  apiVersion: v1beta1
  etcdOperatorServiceAccountName: vault-etcd-operator
  backupOperatorServiceAccountName: vault-etcd-backup
  restoreOperatorServiceAccountName: vault-etcd-restore

deployments:
  etcdOperator: true
  # one time deployment, delete once completed,
  # Ref: https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/backup-operator.md
  backupOperator: true
  # one time deployment, delete once completed
  # Ref: https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/restore-operator.md
  restoreOperator: false

customResources:
  createEtcdClusterCRD: true
  createBackupCRD: true
  createRestoreCRD: false

etcdOperator:
  name: etcd-operator
  replicaCount: 1
  image:
    repository: quay.io/coreos/etcd-operator
    tag: v0.7.0
    pullPolicy: Always
  resources:
    cpu: 100m
    memory: 128Mi
  ## Node labels for etcd-operator pod assignment
  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
  nodeSelector: {}
  ## additional command arguments go here; will be translated to `--key=value` form
  ## e.g., analytics: true
  commandArgs: {}

backupOperator:
  name: etcd-backup-operator
  replicaCount: 1
  image:
    repository: quay.io/coreos/etcd-operator
    tag: v0.7.0
    pullPolicy: Always
  resources:
    cpu: 100m
    memory: 128Mi
  spec:
    storageType: S3
    s3:
      s3Bucket: my-vault-backups
      awsSecret: aws
  ## Node labels for etcd pod assignment
  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
  nodeSelector: {}
  ## additional command arguments go here; will be translated to `--key=value` form
  ## e.g., analytics: true
  commandArgs: {}

【问题讨论】:

  • 根据this 的讨论,有一个针对此问题的积极提案。
  • @Digil 我在原始问题中链接到该讨论。我的问题是:有人解决了这个问题吗?
  • 没有。它仍在进行中,优先级为 P1。
  • @Digil 所以你是说在解决这个问题之前不可能备份 etcd-operator 集群?

标签: etcd kubernetes-helm google-kubernetes-engine


【解决方案1】:

不是一个完整的答案,但这些资源可能会为您指明正确的方向:
https://labs.consol.de/kubernetes/2018/05/25/kubeadm-backup.html
(这是一个自动备份 etcd 的 cronjob。)

还有一个独特的 Kubernetes 灾难恢复工具,称为 Heptio Ark https://www.youtube.com/watch?v=qRPNuT080Hk
它可以根据从 api 服务器读取的数据进行部分和过滤备份和恢复,还可以备份 PV,并进行调度。

因为 Heptio Ark 通过 kube-apiserver 工作,所以即使在主节点和 etcd 被抽象掉的 AKS/托管 kubernetes 等情况下也可以工作。因此,由于它在不直接与 etcd 交互的情况下备份 etcd,因此它可能适用于您的场景。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-04
    • 1970-01-01
    • 2022-07-13
    • 2018-12-24
    • 2015-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多