https://rancher.com/ logo
Title
f

full-fireman-68072

10/29/2022, 1:37 AM
I have a question about longhorn backup, the backup configuration in our system is : S3://clustername-longhorn/us-east1. My understanding is that it is using an test local S3 (Minio) storage. But I can't figure out where the S3 storage is. Can anyone help pointing me to the right direction where I can find the configuration for S3 Server is. I searched many places in the internet, but can't find it. Your help would be appreciated. Martin
1
s

sticky-summer-13450

10/29/2022, 4:00 PM
Using the Longhorn UI - Setting -> General scroll to Backup Target and Backup Target Credential Secret. • Backup Target will be your S3://clustername-longhorn/us-east1. • Backup Target Credential Secret will be the name of a secret in the
longhorn-system
namespace in the kubernetes cluster. In that secret you'll find the
AWS_ENDPOINTS
which will point to the URL of your MinIO server, and it's likely that the secret will say that the
VIRTUAL_HOSTED_STYLE
is
false
meaning the bucket name from the s3:// URL needs to be appended the path and not prepended to the hostname. You'll also find the
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
to access the bucket, and a set of HTTP proxy settings required to access the end-point.
🚀 1
Using
kubectl
to just get the URL of the storage...
$ kubectl get secret $(kubectl get <http://BackupTarget.longhorn.io/default|BackupTarget.longhorn.io/default> -n longhorn-system -o jsonpath='{.spec.credentialSecret}') -o jsonpath='{.data.AWS_ENDPOINTS}' -n longhorn-system | base64 -d
👍 1
f

full-fireman-68072

10/30/2022, 4:00 AM
Thanks Mark, it works.
The config is in the AWS_ENDPOINTS in minio secret, staring at me. But I chose to ignore it because I thought it was AWS_ and irrelevant. Thanks for your guide, Mark, much appreciated.