Home > Blockchain >  Backup AWS EKS cluster configuration
Backup AWS EKS cluster configuration

Time:05-03

A year ago I've configured an AWS EKS cluster for our client. 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.

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:

  • backup all configurations of all related resources for the currently running AWS EKS cluster to be possible to restore it in the future with some reasonably small effort. There is no need to save any information (volumes, data etc).

I'm talking about backup and restore all sort of AWS entities related to the cluster:

  • VPC, networks, subnets, security groups, EKS, ECR and so on as much as possible.

Can anyone point me to the direction for the investigation or to some tool/service, that can help with this task?

CodePudding user response:

You could import your resources in a Terraform template using terraform import.

However, that means you need to know exactly which resources have been used to deploy your EKS cluster. Everything which has been deployed inside the cluster won't be imported though.

CodePudding user response:

You can use terraform to import as Mornor mentioned,

Then using Kubectl, you can dump your deployments and services etc by doing the following:

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.

  • Related