Import generic bucket
How-to import a generic bucket
Buckets that support AWS S3 protocol (like Minio), can be imported as a generic bucket.
Requirements
The Bucket properties:
- Bucket endpoint
- Bucket name
The credentials to access the bucket:
- The access key ID
- The ssecret access key
Process
1. Create the Secret
Store the following file as secret.yaml and substitute the template parameters with real ones.
apiVersion: v1
kind: Secret
metadata:
name: bucket-credentials
stringData:
accessKeyID: <access_key_id>
secretAccessKey: <secret_access_key>
Then create the Secret with the following command:
kubectl -n <namespace_name> apply -f secret.yaml
2. Create the Bucket
Store the following file as bucket.yaml and substitute the template parameters with real ones.
apiVersion: assets.astronetes.io/v1alpha1
kind: Bucket
metadata:
name: <name>
namespace: <namespace>
spec:
generic:
endpoint: mybucket.example.com
name: <bucket_name>
useSSL: true
secretName: bucket-credentials
Deploy the resource with the following command:
kubectl create -f bucket.yaml