如何配置Stash以便与4EVERLAND一起使用
What is Stash?
AppsCode的Stash是一个可靠的工具,用于备份和恢复Kubernetes卷和应用程序。有了Stash,你可以通过定期备份和在数据丢失或系统故障时恢复这些数据来轻松保护你的宝贵数据。Stash功能多样,可用于备份各种Kubernetes资源的数据,包括部署、StatefulSets、DaemonSets、CronJob和自定义资源。如果你有兴趣在4EVERLAND中使用Stash,请继续阅读以了解如何使用。
先决条件:
- Have a running Kubernetes cluster.
- Have Kubernetes tools such as kubectl and helm installed with your cluster.
- Install Stash in your cluster
- You have an account and are logged into the 4EVERLAND Dashboard
- You have generated your 4EVERLAND API key
- Create a 4EVERLAND Bucket
-
创建一个新的命名空间
kubectl create namespace backup
-
接下来,在你的命名空间内创建以下环境变量:
echo -n 'password' > RESTIC_PASSWORD
echo -n '<ACCESS_KEY>' > AWS_ACCESS_KEY_ID
echo -n '<SECRET_KEY>' > AWS_SECRET_ACCESS_KEY
kubectl create secret generic -n backup filebase-secret \\--from-file=./RESTIC_PASSWORD \\--from-file=./AWS_ACCESS_KEY_ID \\--from-file=./AWS_SECRET_ACCESS_KEY
将ACCESS_KEY和SECRET_KEY替换为你的4EVERLAND API Key和API Secret,你可以在Dashboard>Bucket>Access Keys找到。
-
创建一个
4EVERLAND.yaml
文件,内容如下:
apiVersion: stash.appscode.com/v1alpha1
kind: Repository
metadata:name: 4everland-reponamespace: backup
spec:backend:s3:endpoint: endpoint.4everland.cobucket: 4ever-bucket-sampleregion: us-east-1prefix: /backup/storageSecretName: 4ever-secret
-
用以下命令应用存储库:
kubectl apply -f 4everland.yaml
关于 4EVERLAND
4EVERLAND是一个整合了存储、计算和网络核心能力的Web 3.0基础设施。它旨在帮助用户实现从Web 2.0到Web 3.0的顺利飞跃,并成为数百万Web 3.0开发者和应用程序的基础设施。
Website | Twitter | Telegram | Discord | Reddit | Medium | Email