Sitemap

Integrating Kasten K10 with TrueNAS for Backup on OpenShift

4 min readApr 11, 2026

--

Press enter or click to view image in full size

Modern Kubernetes environments require reliable backup and disaster recovery. Kasten K10 is a Kubernetes-native data protection platform that provides policy-driven backups, application mobility, and disaster recovery. When combined with TrueNAS NFS storage, it becomes a powerful and cost-effective backup repository for OpenShift workloads.

This article explains how to integrate Kasten K10 with TrueNAS using NFS storage to enable automated application backups.

Prerequisites

Before you begin, ensure the following are in place:

  • TrueNAS Server : A TrueNAS server with the NFS service running
  • TrueNAS NFS Host : IP address or hostname of the TrueNAS server
  • NFS Mount Path : Dataset path exported via NFS
  • Storage Capacity : Sufficient storage allocated for backups
  • NFS Permissions : Appropriate dataset permissions configured
  • Kasten K10 : Installed on the OpenShift cluster in the kasten-io namespace
  • VolumeSnapshotClass

Why Use TrueNAS as a Backup Target

TrueNAS provides enterprise-grade storage with strong data integrity.

Key advantages:

ZFS filesystem

  • End-to-end checksums
  • Data corruption protection
  • Snapshot capability

NFS support

  • Native integration with Kubernetes
  • RWX access mode
  • Easy external storage integration

Large backup repository

  • Ideal for long-term backup retention
  • Cost-efficient compared to cloud object storage

Creating the TrueNAS NFS Backup Repository

First, create a dataset inside the storage pool.

Example dataset:

/mnt/pool0/k10-repo

Then configure the NFS share.

Important settings:

| Setting       | Value      |
| ------------- | ---------- |
| Maproot User | root |
| Maproot Group | wheel |

Disabling root squashing ensures Kasten can write backup data.

Connecting OpenShift to TrueNAS

Create a static PersistentVolume pointing to the TrueNAS NFS share.

kind: PersistentVolume
apiVersion: v1
metadata:
name: truenas-persistent-volume
spec:
capacity:
storage: 50Gi
nfs:
server: 112.12.11.21 # Your TrueNAS server IP
path: /mnt/pool0/k10-repo # NFS export path on TrueNAS
accessModes:
- ReadWriteMany
mountOptions:
- hard
- nfsvers=4.1



Expected output:

```
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS
truenas-persistent-volume Bound truenas-pv 50Gi RWX nfs
```

Then create a PVC in the kasten namespace.

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: truenas-persistent-volume-claim
namespace: kasten-io
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi
volumeName: truenas-persistent-volume
storageClassName: "" #it should be nfs storage class or cephfs
volumeMode: Filesystem

This PVC becomes the backup repository for Kasten exports.

Creating the Kasten Location Profile

Kasten uses a Location Profile to define backup storage.

kind: Profile
apiVersion: config.kio.kasten.io/v1alpha1
metadata:
name: truenas-profile
namespace: kasten-io
spec:
type: Location
locationSpec:
type: FileStore
fileStore:
claimName: truenas-persistent-volume-claim
path: /

This configuration tells Kasten to store backup exports on the TrueNAS NFS volume.

Create the Shallow StorageClass

If your cluster uses ODF/OCS with CephFS, create a shallow StorageClass to optimize export performance.

Without this:

  • Full clone is created
  • Higher storage usage
  • Slower backups

With backingSnapshot: "true":

  • Instant snapshot-backed clone
  • Minimal storage usage
  • Faster exports
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: cephfs-shallow
annotations:
k10.kasten.io/sc-supports-block-mode-exports: 'true'
k10.kasten.io/sc-supports-read-only-mount: 'true'
provisioner: openshift-storage.cephfs.csi.ceph.com
parameters:
clusterID: openshift-storage
fsName: ocs-storagecluster-cephfilesystem
backingSnapshot: 'true'
reclaimPolicy: Delete
allowVolumeExpansion: true
volumeBindingMode: Immediate

Annotate the VolumeSnapshotClass

Kasten requires a VolumeSnapshotClass annotated with its specific annotation. Without this, backup policies will fail with a “Failed to find VolumeSnapshotClass” error.

# Find your existing VolumeSnapshotClasses:


$ oc get volumesnapshotclass


# Annotate the one that matches your storage provisioner

# For CephFS

$ oc annotate volumesnapshotclass ocs-storagecluster-cephfsplugin-snapclass \
k10.kasten.io/is-snapshot-class=true

# For RBD
$ oc annotate volumesnapshotclass ocs-storagecluster-rbdplugin-snapclass \
k10.kasten.io/is-snapshot-class=true

Backup Policy Example

Kasten policies define how often backups run.

Example weekly policy:

apiVersion: config.kio.kasten.io/v1alpha1
kind: Policy
metadata:
name: true-nas-snapshot
namespace: kasten-io
spec:
frequency: "@weekly"
retention:
daily: 7
selector:
matchExpressions:
- key: k10.kasten.io/appNamespace
operator: In
values:
- production # Replace with your app namespace
actions:
- action: backup
backupParameters:
filters: {}
profile:
name: truenas-profile
namespace: kasten-io
imageRepoProfile:
name: truenas-profile
namespace: kasten-io
- action: export
exportParameters:
frequency: "@daily"
profile:
name: truenas-profile
namespace: kasten-io
exportData:
enabled: true
overrides:
- storageClassName: ocs-storagecluster-cephfs
enabled: true
exporterStorageClassName: cephfs-shallow
retention:
daily: 30

Verify the Setup

# Check all resources


$ oc get pvc truenas-pvc -n kasten-io

$ oc get profile true-nas -n kasten-io

$ oc get policy true-nas-dailysnapshot -n kasten-io

$ oc get volumesnapshotclass


# Trigger a manual policy run


$ oc -n kasten-io annotate policy true-nas-dailysnapshot \
k10.kasten.io/manualTrigger=$(date +%s) --overwrite

# Monitor the run

$ oc get actions -n kasten-io --sort-by=.metadata.creationTimestamp | tail -5

Conclusion

Integrating Kasten K10 with TrueNAS provides a cost-effective, enterprise-grade backup solution for OpenShift workloads.

With this setup:

  • Fast restores are handled via CSI snapshots
  • Long-term retention is managed through TrueNAS
  • Backup operations are automated and scalable

This combination ensures both operational efficiency and disaster recovery readiness for Kubernetes environments.

:) Be sure to clap and follow the writer

About The Author
Suraj Solanki
Senior DevOps Engineer
LinkedIn: https://www.linkedin.com/in/suraj-solanki
Topmate: https://topmate.io/suraj_solanki

--

--

Suraj Solanki
Suraj Solanki

Written by Suraj Solanki

Senior DevOps Engineer | Enthusiast of cloud & automation | Always learning & sharing insights | Connect me on https://www.linkedin.com/in/suraj-solanki