[英]Backup AWS EKS cluster configuration
A year ago I've configured an AWS EKS cluster for our client.一年前,我为我们的客户配置了一个 AWS EKS 集群。 I've created it with help of lots of manuals.
我在很多手册的帮助下创建了它。 There are cluster configuration files present (I've applied all changes to the cluster only using those files), but I'm not 100% sure, that there was no direct command line changes applied to the cluster.
存在集群配置文件(我仅使用这些文件将所有更改应用到集群),但我不能 100% 确定没有直接命令行更改应用于集群。
Currently I have a request from the client to stop entire cluster to not being charged.目前,我收到客户的请求,要求停止整个集群以免收费。 The only way is to delete it with all related resources.
唯一的方法是将其与所有相关资源一起删除。
But the thing is that client would want to restore it at some point in the future.但问题是客户希望在将来的某个时候恢复它。
So overall task sounds like this:所以总体任务听起来像这样:
I'm talking about backup and restore all sort of AWS entities related to the cluster:我说的是备份和恢复与集群相关的各种 AWS 实体:
Can anyone point me to the direction for the investigation or to some tool/service, that can help with this task?任何人都可以指出调查的方向或可以帮助完成此任务的某些工具/服务吗?
You could import your resources in a Terraform template using terraform import .您可以使用terraform import在 Terraform 模板中导入您的资源。
However, that means you need to know exactly which resources have been used to deploy your EKS cluster.但是,这意味着您需要确切知道哪些资源已用于部署您的 EKS 集群。 Everything which has been deployed inside the cluster won't be imported though.
但是,不会导入已部署在集群内的所有内容。
You can use terraform to import as Mornor mentioned,您可以使用 terraform 导入,如 Mornor 所述,
Then using Kubectl, you can dump your deployments and services etc by doing the following:然后使用 Kubectl,您可以通过执行以下操作来转储您的部署和服务等:
kubectl get services --all-namespaces -o yaml > all-service.yaml
kubectl get deployments --all-namespaces -o yaml > all-deployments.yaml
You can directly target a namespace or a specific deployment or service.您可以直接将命名空间或特定部署或服务作为目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.