Menu Close

Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

38.2. 为静态 pod 恢复 etcd 仲裁

如果您在使用静态 pod 进行 etcd 的集群中丢失了 etcd 仲裁,请执行以下步骤:

流程

  1. 停止 etcd pod:

    mv /etc/origin/node/pods/etcd.yaml .
  2. 在 etcd 主机上临时强制新集群:

    $ cp /etc/etcd/etcd.conf etcd.conf.bak
    $ echo "ETCD_FORCE_NEW_CLUSTER=true" >> /etc/etcd/etcd.conf
  3. 重启 etcd pod:

    $ mv etcd.yaml /etc/origin/node/pods/.
  4. 停止 etcd pod 并删除 FORCE_NEW_CLUSTER 命令:

    $ mv /etc/origin/node/pods/etcd.yaml .
    $ rm /etc/etcd/etcd.conf
    $ mv etcd.conf.bak /etc/etcd/etcd.conf
  5. 重启 etcd pod:

    $ mv etcd.yaml /etc/origin/node/pods/.