When your Kubernetes cluster goes down, backup is not enough — you need disaster recovery. While tools like Velero handle cluster-level backups, application-level data protection requires a different approach. This guide compares three Kubernetes-native disaster recovery platforms: Kanister, K8up, and Stash — each offering unique strategies for protecting stateful workloads.

What Is Kubernetes Disaster Recovery?

Kubernetes disaster recovery goes beyond simple volume snapshots. It encompasses:

  • Application-consistent backups — quiescing databases before snapshotting
  • Cross-cluster replication — replicating state to a secondary cluster
  • Automated failover — restoring workloads with minimal RTO
  • Point-in-time recovery — restoring to a specific moment before data corruption

Unlike general-purpose backup tools, K8s-native DR platforms understand Custom Resource Definitions (CRDs), Secrets, ConfigMaps, and the dependency graph between resources.

Kanister

Kanister (⭐ 872+) is an open-source framework by Cast AI for application-level data management on Kubernetes. It uses blueprints — YAML-defined recovery procedures — to coordinate backup and restore operations for specific applications.

Architecture

Kanister runs as a controller in your cluster. It watches Kanister CRDs and executes blueprints that define backup, restore, and cleanup phases. Blueprints use a template language that can run arbitrary shell commands inside pods.

Key Features

  • Blueprint-based recovery procedures for specific applications
  • Supports PostgreSQL, MongoDB, MySQL, Cassandra, CouchDB, and more
  • Object storage backends: AWS S3, Azure Blob, GCS, or any S3-compatible store
  • Cross-cluster restore capability
  • Integration with ArgoCD for GitOps workflows

Docker Compose / Deployment

Kanister deploys via Helm:

1
2
helm repo add kanister https://charts.kanister.io
helm install kanister kanister/kanister-operator --namespace kanister --create-namespace

Sample blueprint for PostgreSQL:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apiVersion: cr.kanister.io/v1alpha1
kind: Blueprint
metadata:
  name: postgresql-bp
actions:
  backup:
    kind: BlueprintPhase
    objects:
      - statefulset
    phases:
      - func: KubeExec
        name: pgDump
        objects:
          statefulset: "{{ .StatefulSet.Name }}"
        args:
          namespace: "{{ .StatefulSet.Namespace }}"
          command:
            - "bash"
            - "-c"
            - "pg_dump -U postgres -Fc mydb > /backup/dump.fc"
  restore:
    kind: BlueprintPhase
    objects:
      - statefulset
    phases:
      - func: KubeExec
        name: pgRestore
        objects:
          statefulset: "{{ .StatefulSet.Name }}"
        args:
          namespace: "{{ .StatefulSet.Namespace }}"
          command:
            - "bash"
            - "-c"
            - "pg_restore -U postgres -d mydb /backup/dump.fc"

Pros and Cons

FeatureKanister
Blueprint-based✅ Highly customizable
App consistency✅ Quiescing support
Cross-cluster restore✅ Supported
Learning curve⚠️ Blueprints require YAML expertise
Community size⚠️ Smaller community

K8up

K8up (⭐ 961+) is a Kubernetes and OpenShift backup operator built on top of Restic. It provides a Kubernetes-native interface to Restic’s proven backup engine, making it ideal for teams already familiar with Restic’s deduplication and encryption.

Architecture

K8up runs as an operator that creates CronJob-like resources for backup scheduling. It uses Restic under the hood, storing backups in any S3-compatible backend or SFTP server. Each backup is encrypted client-side before transmission.

Key Features

  • Built on Restic — proven deduplication and encryption
  • Kubernetes-native CRD interface (Backup, Schedule, Restore, Check, Prune)
  • Automatic backup of PersistentVolumeClaims and arbitrary directories
  • Pre- and post-backup hooks for application consistency
  • Runs on any Kubernetes or OpenShift cluster

Docker Compose / Deployment

K8up deploys via Helm:

1
2
helm repo add k8up https://k8up-io.github.io/k8up
helm install k8up k8up/k8up --namespace k8up --create-namespace

Sample Schedule CRD:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apiVersion: k8up.io/v1
kind: Schedule
metadata:
  name: daily-backup
  namespace: production
spec:
  backend:
    repoPasswordSecretRef:
      name: restic-password
      key: password
    s3:
      endpoint: https://s3.example.com
      bucket: k8up-backups
      accessKeyIDSecretRef:
        name: s3-credentials
        key: access-key
      secretAccessKeySecretRef:
        name: s3-credentials
        key: secret-key
  backendDeploymentName: k8up
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 3
  backup:
    schedule: "0 2 * * *"
    keepJobs: 7
  restore:
    schedule: ""
  check:
    schedule: "0 3 * * 0"
  prune:
    schedule: "0 4 1 * *"
    retention:
      keepDaily: 7
      keepWeekly: 4
      keepMonthly: 12

Pros and Cons

FeatureK8up
Restic foundation✅ Deduplication + encryption
Kubernetes-native✅ Full CRD interface
Pre/post hooks✅ For app consistency
Retention policies✅ Flexible keep rules
Platform support✅ K8s + OpenShift

Stash

Stash (⭐ 1400+) by AppsCode is a Kubernetes-native backup solution that supports both Restic and Restic-compatible backends. It offers a unified operator for backing up volumes, databases, and Kubernetes resources.

Architecture

Stash installs as an operator that creates BackupConfiguration and RestoreSession CRDs. It supports sidecar injection for consistent backups and can backup to S3, GCS, Azure Blob, B2, or local storage.

Key Features

  • Database backup plugins for PostgreSQL, MySQL, MongoDB, MariaDB, Redis, Elasticsearch
  • Volume snapshot support via CSI
  • Repository-level encryption
  • Metrics export to Prometheus
  • Integration with KubeStash for cross-cluster replication

Docker Compose / Deployment

Stash deploys via Helm:

1
2
3
helm repo add appscode https://charts.appscode.com/stable/
helm repo update
helm install stash appscode/stash   --version v2024.12.18   --namespace stash --create-namespace   --set features.enterprise=false

Sample BackupConfiguration for PostgreSQL:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
apiVersion: stash.appscode.com/v1beta1
kind: BackupConfiguration
metadata:
  name: postgres-backup
  namespace: production
spec:
  schedule: "0 2 * * *"
  task:
    name: postgres-backup-16.1
  repository:
    name: s3-repo
  target:
    ref:
      apiVersion: appcatalog.appscode.com/v1alpha1
      kind: AppBinding
      name: postgres-app
  retentionPolicy:
    name: "keep-last-30"
    keepLast: 30
    prune: true

Comparison Table

FeatureKanisterK8upStash
Core engineCustom blueprintsResticRestic + plugins
Backup targetS3, GCS, Azure, S3-compatibleS3, SFTP, any Restic backendS3, GCS, Azure, B2, local
App consistencyBlueprint-driven quiescingPre/post hooksSidecar + plugins
Deduplication❌ No✅ Yes (Restic)✅ Yes (Restic)
Encryption❌ Backend-dependent✅ Client-side✅ Repository-level
Database pluginsBlueprint-basedGeneric hooksBuilt-in plugins
Retention policiesBlueprint-definedCron-based keep rulesPolicy CRD
Prometheus metrics✅ Yes✅ Yes✅ Yes
OpenShift support✅ Yes✅ Yes✅ Yes
Cross-cluster restore✅ Yes❌ No⚠️ Enterprise only
Stars (GitHub)~872~961~1407
Last update2026-04-292026-05-012026-04-16

Which Tool Should You Choose?

Choose Kanister if you need application-specific recovery procedures with fine-grained control over backup and restore phases. Blueprint-based approach works well for complex multi-step recovery scenarios.

Choose K8up if you want the simplicity of Restic with a Kubernetes-native interface. Ideal for teams that already use Restic and want to extend it to K8s workloads with deduplication and encryption built in.

Choose Stash if you need built-in database backup plugins with minimal configuration. The operator handles database quiescing, backup, and verification automatically for popular databases.

Why Self-Host Your Kubernetes DR?

Running your own disaster recovery solution gives you full control over backup schedules, retention policies, and data sovereignty. Cloud-provider DR services often lock you into a specific ecosystem and charge premium rates for cross-region replication. Self-hosted DR tools let you use any S3-compatible storage backend — including MinIO, Ceph, or Wasabi — at a fraction of the cost.

For broader Kubernetes backup strategies, see our Velero vs Stash vs Volsync comparison and backup verification testing guide. For Kubernetes security hardening, check our Kube-bench vs Trivy vs Kubescape guide.

FAQ

What is the difference between backup and disaster recovery in Kubernetes?

Backup captures data at a point in time. Disaster recovery encompasses the full process of restoring services, including application state, configuration, and networking. DR tools like Kanister, K8up, and Stash handle both data backup and the orchestrated restoration of workloads.

Can these tools back up stateful databases consistently?

Yes. Kanister uses blueprints to quiesce databases before backup. K8up supports pre- and post-backup hooks for application consistency. Stash has built-in plugins for PostgreSQL, MySQL, MongoDB, and other databases that handle consistent snapshots automatically.

Do these tools support cross-cluster disaster recovery?

Kanister supports cross-cluster restore, allowing you to recover workloads to a different cluster. K8up does not natively support cross-cluster operations. Stash offers cross-cluster replication only in its enterprise edition.

How is data encrypted in transit and at rest?

K8up encrypts data client-side using Restic’s built-in encryption before sending it to the backend. Stash provides repository-level encryption. Kanister relies on the backend storage provider for encryption — configure your S3 bucket with server-side encryption.

Which tool has the smallest resource footprint?

K8up is generally the lightest since it runs as a single operator and leverages Restic’s efficient deduplication. Kanister requires running blueprint executors which may consume more resources during backup phases. Stash’s sidecar injection adds a small overhead per backed-up workload.

Can I use these tools with on-premises S3 storage?

Yes. All three tools support any S3-compatible endpoint. You can use MinIO, Ceph RadosGW, or any other S3-compatible storage running in your data center as the backup target.