Alternative way for having failover system for AWS EKS using CloudCasa
Tags: tutorial, aws, cloud, community
Published: 2023-01-30 01:49:12

I was intrigued by the Kubernetes demo on CloudCasa by Yongkang at [AWS community day](https://www.awsugsg.dev/) in Singapore. The product features looked so promising, I just had to try it out myself. 

Using CloudCasa, you can backup and secure your Kubernetes clusters. Or alternatively, you can also automate the backup. But the feature that really caught my attention was the tool available to simplify the failover process should the live system go down. 

## Initial
To test the failover capability, we have to create an EKS cluster first. If you need guidance on how to install an EKS cluster, you can read my article [here](https://dev.to/iilness2/practical-basic-approach-for-running-aws-eks-with-existing-vpc-2e1m).

Before starting, what you need to create a CloudCasa account first. You need to register with their website first [here](https://cloudcasa.io/kubernetes-backup/).

After you have opened a CloudCasa account, you can start to add your EKS cluster into CloudCasa by clicking **add cluster button**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9yqw9whsodjg6f1c2top.png)

and then you need to install the agent that prompt for your kubernetes cluster

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rubao7d9utgkjmu1lwc1.png)

After a while, you can check the dashboard to see if your EKS Cluster has already connected with CloudCasa.

Before starting a backup, we will also need to register our AWS account so CloudCasa can create a new cluster when we need it later.

To register the cloud account, you can go to the Cloud Accounts page, click *Add Cloud Account* button and when add cloud account page open, select Amazon Web Services 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ns3uogp77xytzbb05fvc.png)

Afterwards, click the **launch stack**. Make sure you already login into the AWS account before that so the launch stack can running well.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z1vaubs1prigse8mpqvq.png)

## Backup
After that you can start to backup your container by choosing *add backup* button and then filling in the information requirement.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/srpn37mssse2tfr1ci84.png)

For the next page, you need to choose between full cluster or spesific you want to backup, include persistent volume, and snapshot only or with copy as well.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi56gyh9hejlfawvtu57.png)

After you make all the choices, the process backup will start. Make sure the process backup finishes first before going to the next step

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5kw9rs5daf70l102lw7a.png)

## Restore
Next step, you can start to restore your cluster by choosing **restore** button, in restore point, choose the backup that we created before

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gh5ivjo0ri9mu53oxpsx.png)

In selected resources step, you can choose all resources that will need to go into the new cluster.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/agp0nhiz3z8dcuxrw6k1.png)

Next, In destination step, you choose to select create new cluster. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wm5bdi6osarmv0wizw0t.png)

and choose into EKS cluster

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/16tcjdamasis9j4snprm.png)

After that on EKS option part, you need to fill all the configuration you want for new cluster like cluster name, aws user, region, EKS Cluster IAM role, and VPC Configuration

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/354fwbj9tztre5bc13cq.png)

For node pool config, you need to fill all the server specification you want for new EKS cluster like Node IAM role, VM Size, TMP Disk Size (system), and Worker node auto-scaling

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b29tz9ht4wxgjqp4t24a.png)

After you finish all the requirement configuration, you just need to wait until CloudCasa finishes restore our cluster with the new one.

**P.S**: After you have verified all the services that are running inside the new cluster, don't forget to update your DNS to point into new services.

## Conclusion
I think CloudCasa is good product for helping us to achieve high availability for our services, especially for providing good backup that can lead into failover. Another interesting thing from CloudCasa is support not only for AWS, but also for other cloud services such as GCP and Azure.

For more information regarding CloudCasa you can watch their youtube [here](https://www.youtube.com/@cloudcasa) or their official docs [here](https://docs.cloudcasa.io/help/index.html)

I think that's it for now. Let me know what your thoughts are in the comments section below. Thanks.