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

问题描述

如何使用kops还原kubernetes集群?我在s3存储桶中有kubernetes状态文件.

是否有使用kops还原kubernetes集群的方法?

解决方案

如前所述,kops将群集的状态存储在S3存储桶中.如果使用相同的状态文件运行kops create cluster,它将使用相同的实例组和主配置重新创建群集.这假定集群已被删除,如果没有删除,则需要使用kops update cluster命令,如果集群的状态发生分歧,该命令应将状态恢复到所需状态一次.

但是,这不涉及集群内部的资源和部署,要实现完全恢复,您可能需要恢复这些部署.为了实现这一点,您需要备份Kubernetes使用的etcd数据存储. 本文档对此进行了更详细的介绍. >

您可能还需要考虑使用 Velero 之类的东西来备份etcd状态

How do I restore kubernetes cluster using kops?I've kubernetes state files in my s3 bucket.

Is there a way to restore kubernetes cluster using kops?

解决方案

As you mention, kops stores the state of the cluster in an S3 bucket. If you run kops create cluster with the same state file, it will recreate the cluster as it was before, with the same instancegroups and master configuration. This assumes the cluster has been deleted, if not, you'll need to use the kops update cluster command which should bring the state back to your desired once if the state of the cluster has diverged.

However, this doesn't cover the resources and deployments inside the cluster, and to achieve a full recovery, you may want to recover those deployments. In order to achieve this, you'll need to backup the etcd datastore used by Kubernetes. This document covers this in more detail.

You may also want to consider using something like Velero for backing up the etcd state

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

08-23 06:00