Closed dfry closed 1 month ago
I'm not an expert on the Velero Helm chart, so I may not be able to guide you through how to set up the environment by Helm, but I found some issues in your Helm values.yaml
configuration. That may help you to further debug the error you met.
First, the provider should aws
, not velero.io/aws
.
# provider is the name for the backup storage location provider.
provider: aws
Please find the example of setting AWS environment in this document: https://github.com/vmware-tanzu/velero-plugin-for-aws?tab=readme-ov-file#install-and-start-velero
Second, please consider whether the prefix is needed.
prefix: "backups"
The prefix is used to host multiple Velero Object Storage in the same bucket.
You use a random ID as the prefix to make sure it will not conflict with others, but backups
seems not a good one.
thanks for the suggestions @blackpiglet , regarding the provider name and the prefix, i had changed those for troubleshooting purposes. I changed the provider to aws and removed the prefix, same error:
apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
creationTimestamp: '2024-10-11T13:55:09Z'
generation: 5058
labels:
app.kubernetes.io/instance: velero
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: velero
helm.sh/chart: velero-7.2.1
k8slens-edit-resource-version: v1
name: cloudprovider-objectstorage
namespace: velero
resourceVersion: '4360464'
uid: d269e2b4-2347-42c6-8419-a242ade95808
spec:
accessMode: ReadWrite
config:
profile: default
region: eu-west-2
credential:
key: cloud
name: velero-cloud-api-secret
default: true
objectStorage:
bucket: velero
provider: aws
status:
lastValidationTime: '2024-10-15T08:25:39Z'
message: >-
BackupStorageLocation "cloudprovider-objectstorage" is unavailable: rpc
error: code = Unknown desc = operation error S3: ListObjectsV2, https
response error StatusCode: 301, RequestID: MD7ZCESMM2ZYZR44, HostID:
iAClEl8eUfcfXOhBhiLz/zHLTmk65k53lCaqh5CBE89exEs27+ez3UN+54W+U5iydXp6g2koAs0=,
api error PermanentRedirect: The bucket you are attempting to access must be
addressed using the specified endpoint. Please send all future requests to
this endpoint.
phase: Unavailable
I have a suspicion that the underlying cause has to do with the bucket being created in a non-default region, I am going to do some more tests on my side, but the logs indicate that the endpoint that the object store code uses results in a redirect.
I found the issue and it is related to the bucket. My cicd was misconfigured and was using "velero" as the bucket which obviously wouldn't work since it is not unique and/or owned by my account.
In any case, I will close this and leave it with this feedback that obviously the error message is misleading. The credentials I am using don't have the correct IAM role to see the "velero" bucket so I would have expected a 403 or something else.
What steps did you take and what happened:
I configure temporary credentials with a granted role with the appropriate permissions for velero.
The credentials are saved to a secret in the velero namespace with the following format:
I configure the helm chart values as follows:
env vars referenced above are substituted before deployment with the below:
I am getting the following error message in the logs:
What did you expect to happen:
I expect the s3 commands to not fail.
The following information will help us better understand what's going on:
If you are using velero v1.7.0+:
Please use
velero debug --backup <backupname> --restore <restorename>
to generate the support bundle, and attach to this issue, more options please refer tovelero debug --help
If you are using earlier versions:
Please provide the output of the following commands (Pasting long output into a GitHub gist or other pastebin is fine.)
kubectl logs deployment/velero -n velero
velero backup describe <backupname>
orkubectl get backup/<backupname> -n velero -o yaml
velero backup logs <backupname>
velero restore describe <restorename>
orkubectl get restore/<restorename> -n velero -o yaml
velero restore logs <restorename>
Anything else you would like to add: I also tested this with aws cli v2 as well as the github.com/aws/aws-sdk-go-v2/aws making use of the same credentials as with the plugin, with no issues.
Environment:
velero version
): helm version 7.2.1velero client config get features
): aws plugin, tested on versions 1.9.3 and 1.10.1kubectl version
): 1.30/etc/os-release
): ubuntu 20.04Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.