本文介绍了恢复Kops Kubernetes集群的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个由kops创建的kubernetes集群当运行kops validate时,这是输出:

There's a kubernetes cluster that was created by kopsand when running kops validate this is the output:

    INSTANCE GROUPS
NAME            ROLE    MACHINETYPE MIN MAX SUBNETS
master-us-east-1a   Master  m4.xlarge   1   1   us-east-1a
nodes           Node    c4.2xlarge  1   75  us-east-1a

NODE STATUS
NAME                ROLE    READY
ip-172-20-59-93.ec2.internal    master  False

VALIDATION ERRORS
KIND    NAME                MESSAGE
Machine i-0a44bbdd18c86e846     machine "i-0a44bbdd18c86e846" has not yet joined cluster
Machine i-0d3302056f3dfeef0     machine "i-0d3302056f3dfeef0" has not yet joined cluster
Machine i-0d6199876b91962f4     machine "i-0d6199876b91962f4" has not yet joined cluster
Node    ip-172-20-59-93.ec2.internal    master "ip-172-20-59-93.ec2.internal" is not ready

Validation Failed

如何恢复该群集?该群集的s3文件可用.

How I can recover this cluster? The s3 files for this cluster are available.

etcd卷显示为使用中"状态

The etcd volumes show status as "in-use"

推荐答案

kops将群集的状态存储在S3中.

kops stores the state of your cluster in S3.

  1. 找到存储状态的存储桶
  2. 设置export KOPS_STATE_STORE=s3://your-k8s-state-store
  3. 运行kops update cluster
  4. 如果失败.
  5. 终止与集群相关的所有实例
  6. 运行kops create cluster
  1. Find the bucket where the state is stored
  2. Set export KOPS_STATE_STORE=s3://your-k8s-state-store
  3. Run kops update cluster
  4. If that fails.
  5. Terminate all your instances related to the cluster
  6. Run kops create cluster

请注意,群集的内部状态不在S3中,而在etcd中.此处的答案具有有关此主题以及如何备份/还原etcd的更多详细信息:如何使用Kops恢复Kubernetes集群?

Note that the internal state of your cluster is not in S3 but in etcd. The answer here has more details about this topic and also how to backup/restore etcd: How to restore kubernetes cluster using kops?

这篇关于恢复Kops Kubernetes集群的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 06:00