Kubernetes Ransomware Recovery: Choosing Between DR Failover and Clean Restore

A disaster recovery site that mirrors your primary site will also mirror an attack on it. That single fact decides most of the first hour after ransomware reaches a Kubernetes platform.

Teams that run stateful workloads on Kubernetes often have two recovery tools. Storage-replication-based DR moves applications to a second site in minutes. Backup restores applications from a recovery point taken before the incident. Which one to use depends on whether you can trust the data, and the wrong choice either wastes time or brings the infection back with you.

This post walks through when each path fits, using CloudCasa DR and immutable CloudCasa backups as the examples. It was written together with Sorigo, a Warsaw-based IT services company that builds data, microservices, and cloud solutions on Kubernetes for enterprises in telco, finance, utilities, and retail.

Replication copies the damage along with the data

Storage replication exists to keep the DR copy as close to production as possible. With synchronous replication, every write reaches the second array before it is acknowledged. With asynchronous or periodic replication, writes follow after a short delay or on the next replication cycle.

Ransomware encrypting a persistent volume is also writing to it. Those writes replicate like any others, so by the next replication cycle, or immediately with synchronous replication, the DR volumes hold the same encrypted blocks as production. A faster replication mode, which is what gives you a low RPO, also shortens the time before the damage reaches the second site.

The Kubernetes side behaves the same way. CloudCasa DR keeps an inventory of protected workloads that follows their current state, which is what makes a fast failover possible. It also means the DR inventory reflects the workloads as they are now, so changes made to them during an attack can carry over to the DR site.

Replication is built for site loss, such as an array failure or the loss of a data center. Ransomware is a data integrity problem, and recovering from it needs a copy that new writes cannot change.

Diagram showing ransomware writes on the primary storage array replicating to the DR array, while the CloudCasa agent writes recovery points to separate immutable backup storage that the attack cannot change

Replication carries encrypted writes to the DR site; immutable backups keep recovery points the attack cannot change.

When DR failover is the right call

Fail over when the primary site is unavailable or untrusted as infrastructure, and you have reason to believe the data itself is clean. Typical cases include an array failure, a data center power or network outage, or an attack that hit management systems at the primary site without touching application volumes.

CloudCasa DR for Storage is built for this case. It combines CloudCasa orchestration with replication on supported storage systems. The CloudCasa DR setup guide lists three supported storage families:

  • HPE Alletra Storage 9000 and Alletra Storage MP B10000, using HPE Remote Copy
  • Dell PowerStore, using PowerStore synchronous or asynchronous replication
  • SUSE Storage (Longhorn), using Longhorn Disaster Recovery Volumes

A DR Plan protects selected namespaces, or a set of Deployments, StatefulSets, and VMs. A DR agent records the state of those workloads to an inventory volume that the array replicates along with the application volumes. When an operator runs a DR Recovery job, CloudCasa fails over the inventory volume, restores the inventory PVC on the target cluster, starts the DR agent from it, fails over the remaining volumes, and then restores the Kubernetes resources, PVCs, and PVs on the DR site. The failover guide also covers failback to the original site.

CloudCasa DR is designed for recovery in seconds or minutes, with an RPO set by the replication mode. Actual results depend on replication mode, workload size, and cluster readiness. With synchronous replication, RPO can approach zero, as the CloudCasa and Dell PowerStore post notes.

Six-step flow of a CloudCasa DR failover: stop source workloads, fail over the inventory, start the DR agent, fail over the remaining volumes, restore resources, and run workloads at the DR site

A CloudCasa DR failover is one operator-initiated job: the arrays move the data, CloudCasa rebuilds the Kubernetes side.

Three details belong in any DR runbook:

Failover is operator-initiated. CloudCasa runs failover as a job someone starts. It does not fail over on its own, which is the behavior you want when the trigger could be an attack.

Design consistency groups to match DR Plans. Storage fails over by consistency group, and a consistency group can’t span the workloads of more than one DR Plan. Plan the two together, so each group holds the volumes of workloads that recover together.

Source workloads stop by default. The DR Recovery job has a “Stop workloads before failover” option that is on by default. When CloudCasa can reach the primary site, it scales down Deployments and powers off VMs there before failing over. If it can’t reach the primary, failover proceeds anyway, and the operator has to make sure the primary does not come back and write while the DR site is active.

Backup and DR are licensed separately, per worker node, and both run in one CloudCasa product. For the full DR offering and its solution briefs, see CloudCasa DR for Storage. For array-specific detail, see CloudCasa and Dell PowerStore and CloudCasa and SUSE Storage. SUSE is also a Sorigo partner.

When clean restore from backup is the right call

Restore from backup when the data or the cluster configuration may be compromised. Encrypted volumes, deleted resources, unknown workloads, or altered secrets all point here. In that situation the question becomes: which copy predates the attack, and can you trust that nobody changed it since?

CloudCasa answers the second part with immutable backups. For immutable backups, the CloudCasa agent in the cluster writes backup data directly to object storage you control, either S3-compatible object storage with Object Lock or Azure Blob Storage with immutable storage. CloudCasa detects whether immutability is enabled and will not add storage that is configured incorrectly. Object Lock or Azure immutable storage protects the backup data itself. SafeLock protects the recovery-point entries in the CloudCasa catalog from deletion before their retention period ends, and it can only be turned on when backups go to immutable storage. Immutable storage and SafeLock require a paid plan.

A clean restore then follows a different order than a failover:

  1. Contain the incident and keep the affected cluster isolated for investigation.
  2. Prepare a clean target cluster, either rebuilt at the primary site or a separate cluster elsewhere.
  3. Pick a recovery point taken before the earliest sign of compromise. Your incident response findings set this point.
  4. Restore the scope you need. CloudCasa can restore an entire cluster, selected namespaces, specific resources, or individual files from protected persistent volumes.
  5. Validate the restored applications before you send traffic to them.
Timeline showing a clean restore: the chosen recovery point before the first sign of compromise is restored to a clean target cluster while the compromised cluster stays isolated

Clean restore: pick a recovery point before the compromise and restore it to a clean cluster.

Restoring to a different cluster is a standard CloudCasa operation, and it is what keeps the compromised environment out of the recovery. The RPO here is the time between the chosen recovery point and the incident, so backup frequency matters as much as retention.

For a broader look at the backup side, including restores across clusters and clouds, see Sorigo’s overview Tackling Microservices Backup Challenges in K8s. For the product view of these controls, see Kubernetes Ransomware Protection.

Which path fits which incident

The deciding question is whether you trust the current data. If you do, fail over. If you do not, restore.

Decision diagram: if current data is trusted, use CloudCasa DR failover; if not, restore from an immutable recovery point to a clean cluster; if unknown, isolate and investigate before deciding

One question decides the recovery path.

SituationIs current data trusted?Recovery pathWhat sets the RPO
Array failure or data center outageYesCloudCasa DR failoverReplication mode
Attack on primary-site infrastructure, application volumes untouchedYes, after investigationCloudCasa DR failover, then rebuild the primaryReplication mode
Encrypted persistent volumesNoRestore from an immutable recovery point to a clean clusterBackup frequency
Deleted or altered Kubernetes resourcesNoRestore selected namespaces or resources to a clean clusterBackup frequency
Unclear scope in the first hoursUnknownKeep both options open: isolate, investigate, and do not fail over until you knowDecided by findings

The last row needs the most discipline. Under pressure, failover can look like the fastest fix. If the compromise has already reached the DR site, a failover moves your users onto damaged data and spends recovery time you will need for the restore.

Decide the recovery path before the incident

The choice between failover and restore is hard to make well in the middle of an incident. It is much easier to make in advance, workload by workload, and write into a runbook.

Sorigo approaches backup and recovery from the platform perspective. When designing a Kubernetes platform, its teams build resilience and recovery into the architecture from the outset: identifying which workloads require a secondary site, which workloads depend on each other and which data sets must be recovered together, and how to restore a clean, trusted cluster if the primary environment is compromised.

“When we design a Kubernetes platform with a customer, we define a recovery strategy for every workload before it goes live. This includes planning for failover if a site becomes unavailable and restoring data from an immutable backup if its integrity is compromised. When an incident occurs, the team can follow a recovery plan that has already been defined and agreed upon.”

Artur Ossowski
CEO, Sorigo

A runbook that covers both paths answers these questions ahead of time:

  • Who decides, and on what evidence? Name the people who can approve a failover, and the findings that rule it out.
  • What RTO and RPO does each workload need? Workloads with tight targets justify DR for Storage. Others may be well served by backup alone.
  • Are DR Plans aligned with consistency groups? Volumes that fail over together should belong to applications that recover together.
  • How often are backups taken, and how long are they kept? Retention has to cover the time an attack can go unnoticed.
  • Where does a clean cluster come from? Keep the build process for a new cluster documented and tested, so a restore does not wait on infrastructure.
  • When was each path last tested? Run restores to a separate cluster on a schedule, and agree with your storage team and CloudCasa support on how to rehearse DR failover.

Regulated organizations have one more reason to do this work. DORA requires financial entities to test their ICT resilience, and NIS2 expects documented incident handling and business continuity. A tested runbook helps provide that evidence. For more on that angle, see NIS2 and DORA Compliance for Kubernetes Backup.

The bottom line

DR failover and clean restore solve different problems. Failover is the fastest way back when the site is lost and the data is sound. Restore from an immutable recovery point is the way back when the data itself is in question. CloudCasa runs both from the same console, so the team can choose the path that fits the incident.

Decide which path each workload takes before you need it, and test both. To see how storage-integrated failover works for stateful applications and VMs, start with CloudCasa DR for Storage.

Frequently asked questions

Does disaster recovery protect Kubernetes from ransomware?

Storage-replication-based DR protects against site loss. Because replication copies new writes to the DR site, encrypted data can reach it as well. Recovery from ransomware depends on backups that the attack cannot change, such as CloudCasa backups on immutable storage with SafeLock. If you need both, use CloudCasa DR for Storage for site loss and immutable backups for data you can no longer trust.

Which storage arrays does CloudCasa DR support?

The CloudCasa docs list HPE Alletra Storage 9000 and Alletra Storage MP B10000 with HPE Remote Copy, Dell PowerStore with synchronous or asynchronous replication, and SUSE Storage (Longhorn) with Longhorn Disaster Recovery Volumes.

Can I restore a Kubernetes backup to a different cluster?

Yes. CloudCasa restores entire clusters, namespaces, or individual resources to the original cluster or to a different one, which is how you recover onto a clean cluster after an attack.

Is CloudCasa DR included in every CloudCasa plan?

No. CloudCasa DR for Storage is an add-on to CloudCasa Pro or Enterprise, licensed separately per worker node.

Planning Kubernetes recovery for both outages and ransomware?

Talk to a CloudCasa specialist about DR for Storage on your arrays and the recovery targets each workload needs. To try backup and restore first, start a 60-day CloudCasa free trial. DR for Storage, SafeLock, and Object Lock on your own storage are not part of the trial.

Sources

Share the Post: