Skip to main content
How should you prepare for disaster recovery in Kubernetes? This guide walks through a practical scenario, the exact backups you need, and a repeatable recovery flow so your application can be restored if a Kubernetes cluster is lost.

Scenario

  • Your order-processing application is running in Kubernetes and serving customers.
  • Pods are healthy, the Service receives traffic, and customer orders are stored in a database.
  • Suddenly the Kubernetes cluster becomes unavailable — the control plane is down, the infrastructure failed, or the cluster was accidentally deleted.
  • You need to get the application running in a recovery environment and restore the data so customers can continue placing and retrieving orders.

What Kubernetes manifests give you — and what they don’t

Kubernetes manifests (Deployments, Services, PersistentVolumeClaims, StatefulSets, Helm charts, CRDs, etc.) describe the desired cluster configuration. If you create a new cluster and apply those manifests, Kubernetes will recreate the objects and begin starting pods and services:
Important distinctions:
  • Manifests recreate configuration and workload definitions (Deployments, Services, RBAC, ConfigMaps, Secrets).
  • Manifests may recreate PVC objects, but they do not automatically recreate the underlying Persistent Volume (PV) data. The cloud disk, CSI-backed volume, or snapshot must be restored separately.
  • If you restore manifests without restoring data, PVCs will be empty or remain unbound and stateful applications will start with no customer data.
Key action: treat configuration and persistent application data as separate recovery items.
Store configuration and data backups in environments independent of the protected cluster (for example, cross-region object storage or a different datacenter). This ensures backups survive cluster-level failures.

Two types of backups (what to back up)

You need both configuration backups and application data backups. The table below summarizes the purpose and examples for each. Recommended tools:
  • Velero — backup of cluster resources and PV snapshots for many clouds.
  • Cloud provider snapshot tools (AWS EBS snapshots, GCP persistent disk snapshots, Azure disk snapshots).
  • Database-native backups: pg_dump, logical replication, point-in-time recovery (PITR).

Recovery flow (step-by-step)

  1. Create a new Kubernetes cluster or bring up an alternate environment.
  2. Prepare the recovery cluster:
    • Install required cluster-scoped resources (CRDs, ClusterRoles, StorageClasses).
    • Install CSI drivers and storage integrations that the original cluster used so PVs can be restored and bound.
  3. Restore configuration:
    • Apply your manifests or install Helm charts to recreate Namespaces, Deployments, Services, RBAC, etc.
    • Restore cluster-level resources such as CRDs and ClusterRoles before applying application manifests.
  4. Restore application data:
    • Restore database from backups (logical dump restore, PV snapshot restore, or promote a replica).
    • Make sure PVCs bind to restored PVs or that StatefulSet volumes map to the restored storage.
  5. Verify the application:
    • Start the application and run end-to-end tests (place/read orders) to validate correctness.
    • Check logs, readiness/liveness probes, and monitoring/alerting for errors.
Example: using Velero to restore both resources and PV snapshots
  • Install Velero in the recovery cluster and configure it to access your off-cluster object storage and snapshot provider.
  • Use Velero restore commands to bring back resources and PV snapshots.

Recovery metrics: RPO and RTO

  • Recovery Point Objective (RPO) — how much data you can afford to lose.
    • Example: RPO = 15 minutes means backups or replication must capture changes at least every 15 minutes.
  • Recovery Time Objective (RTO) — how quickly the application must be back online.
    • Example: RTO = 1 hour means the entire recovery process (cluster creation, restore, validation) must complete within 1 hour.
These metrics drive choices for backup frequency, replication vs. snapshots, automation level, and runbook complexity.

Test your restores

Backups are only useful if they can be restored. Test restores regularly to a non-production recovery environment:
  • Provision a recovery cluster or dedicated recovery namespace.
  • Restore configuration and data into that environment.
  • Deploy the application and simulate user traffic: place orders, query orders, validate state transitions.
  • Time the entire process and verify you meet the RTO.
  • Update runbooks based on lessons learned.
Don’t assume backups are valid without testing. A regularly tested restore process and a documented runbook are essential — when production is down you want a practiced process, not surprises.

Operational recommendations (checklist)

  • Keep manifests, Helm charts, and cluster-level configuration in version control (Git).
  • Store data backups off-cluster in durable, geographically separate object storage.
  • Define RPO and RTO for each application and implement a backup cadence that meets the RPO.
  • Automate backups: scheduled DB dumps, scheduled PV snapshots, or continuous replication.
  • Encrypt backups at rest and in transit and manage keys securely (KMS).
  • Maintain a tested runbook for recovery steps and update it after every test.
  • Periodically perform full restore drills and validate application behavior, performance, and data integrity.
  • Use managed backup/DR tools where appropriate (Velero, cloud provider snapshot services, or commercial DR solutions).
  • Monitor backup jobs and set alerts for failed or delayed backups.
Quick checklist table:

Example commands and patterns

  • Apply manifests:
  • Export cluster resources to YAML for backup:
  • Database logical dump (Postgres example):
  • Velero backup and restore (high level):
Note: the exact PV snapshot/restore sequence depends on your CSI driver and cloud provider. Confirm StorageClass and CSI snapshot class exist in the recovery cluster.

Summary

  • Kubernetes manifests let you recreate configuration and workloads, but they don’t recreate persistent application data by themselves.
  • Implement two complementary backup strategies: configuration backups (YAML, Helm, CRDs) and data backups (DB dumps, PV snapshots, replication).
  • Store backups off-cluster in a durable, separate environment.
  • Define RPO and RTO to shape backup frequency and recovery automation.
  • Regularly test restores, maintain runbooks, and automate as much of the recovery flow as possible to reduce manual errors and meet recovery objectives.

Watch Video