Longhorn.io
Learn how to configure Longhorn.io for Kubernetes to be backed up to Filebase.

What is Longhorn.io?

Longhorn.io is a distributed block storage system for Kubernetes that is lightweight, reliable and simple to use.
Longhorn.io can be configured to backup to a Filebase bucket. Read below for instructions on how to configure this set up.

What is Kubernetes?

Kubernetes is an open-source container system designed for automating computer application deployment, scaling, and management.
Read below to learn how to backup your Longhorn.io Kubernetes storage volumes to Filebase.

Prerequisites:

  • Install Longhorn.io on your Kubernetes cluster.
  • Have your Filebase Access and Secret Keys. Learn how to view your access keys here.
  • Create a Filebase Bucket. Learn how to create a bucket here.
Note: This guide assumes you already have a Kubernetes cluster deployed with networking enabled.
Kubernetes has a wide range of implementations, deployments, and environment configurations. The examples used in this guide use a basic example Kubernetes cluster that does not include packages or configurations other than the ones displayed in this guide. Filebase is unable to provide troubleshooting or custom configurations for custom Kubernetes environments due to their individualized nature.

1. Create a Kubernetes secret that is stored in the namespace of your Kubernetes cluster.

kubectl create secret generic filebase-secret --from-literal=AWS_ACCESS_KEY_ID=Filebase-Access-Key --from-literal=AWS_SECRET_ACCESS_KEY=Filebase-Secret-Key --from-literal=AWS_ENDPOINTS=https://s3.filebase.com

2. Go to the Longhorn UI. This can be found by running the command:

kubectl get svc

3. Record the IP address for the longhorn-frontend pod:

4. In your web browser, navigate to this IP address. In the top navigation bar, click Settings. Scroll to the Backup section.

5. In the Backup section, set Backup Target to:

s3://filebas[email protected]/
Make sure that you have / at the end, otherwise you will get an error. A subdirectory may also be used.

6. In the Backup section set Backup Target Credential Secret to:

filebase-secret

7. Scroll to the bottom of the page and select ‘Save’.

8. Create a backup. Select ‘Volumes’ from the top navigation bar.

9. Select the volume(s) you want to backup, make sure they are ‘attached’, and select ‘Create Backup’.

10. Add any desired tags for the backup, then select ‘Ok’ to start the backup.

11. Select ‘Backup’ from the top navigation bar to view your current volume backup and any previous backups.

12. Check for the backup in your Filebase bucket. Log into the Filebase console and confirm that the backup has been stored in the specified bucket.

If you have any questions, please join our Discord server, or send us an email at [email protected]