Stash for Kubernetes

Learn how to configure Stash for use with Filebase.

What is Stash?

Stash by AppsCode is a tool for backing up and restoring Kubernetes volumes and Kubernetes applications. It provides a simple and reliable way to protect your valuable data by taking regular backups and restoring them in case of any data loss or system failure. Stash can be used to backup data from various Kubernetes resources such as Deployments, StatefulSets, DaemonSets, CronJobs, and other custom resources.
Read below to learn how to use Stash with Filebase.


  • Have a running Kubernetes cluster.
  • Have Kubernetes tools such as kubectl and helm installed with your cluster.
  • Install Stash in your cluster by following the instructions here.
  • Sign up for a free Filebase account.
  • Have your Filebase Access and Secret Keys. Learn how to view your access keys here.
  • Create a Filebase IPFS Bucket. Learn how to create a bucket here.

1. Create a new namespace

kubectl create namespace backup

2. Next, create the following environmental variables within your namespace:

echo -n 'password' > RESTIC_PASSWORD
kubectl create secret generic -n backup filebase-secret \\
--from-file=./RESTIC_PASSWORD \\
--from-file=./AWS_ACCESS_KEY_ID \\
Replace the FILEBASE_ACCESS_KEY and FILEBASE_SECRET_KEY with your Filebase access and secret keys.

3. Create a filebase.yaml file with the following contents:

kind: Repository
name: filebase-repo
namespace: backup
bucket: filebase-bucket-sample
region: us-east-1
prefix: /backup/
storageSecretName: filebase-secret

4. Apply the repository with the following command:

kubectl apply -f filebase.yaml
If you have any questions, please join our Discord server, or send us an email at [email protected]
Last modified 6mo ago