Skip to main content
Version: 3.1

import-buckets

AWS S3

Use the following steps to get started with pre-provisioned buckets:

  1. Create a new file named pxbucketclass.yaml, replacing region and object.portworx.io/endpoint with your desired AWS S3 region and endpoint:

    apiVersion: object.portworx.io/v1alpha1
    kind: PXBucketClass
    metadata:
    name: pbclass-s3
    region: us-west-1
    deletionPolicy: Delete
    parameters:
    object.portworx.io/backend-type: S3Driver
    object.portworx.io/endpoint: s3.us-west-1.amazonaws.com
  2. Create the PXBucketClass object:

  1. Create a new file named pxbucketaccess.yaml:

    apiVersion: object.portworx.io/v1alpha1
    kind: PXBucketAccess
    metadata:
    name: s3-pba-existing
    namespace: default
    spec:
    bucketClassName: pbclass-s3
    existingBucketId: bucket-name-aws
  2. Once the bucket access is granted, its ACCESSGRANTED state will be marked as true in the CustomResource:

NAME              ACCESSGRANTED   CREDENTIALSSECRETNAME               BUCKETID               BACKENDTYPE
s3-pba-existing true px-os-credentials-s3-pba-existing existing-bucket-id S3Driver
  1. A secret px-os-credentials-s3-pba-existing will be created with all necessary bucket info:

apiVersion: v1
data:
access-key-id: <ACCESS-KEY-ID>
bucket-id: <BUCKET-ID>
endpoint: <ENDPOINT>
region: <REGION>
secret-access-key: <SECRET-ACCESS-KEY>
kind: Secret
metadata:
creationTimestamp: "2022-08-03T21:27:25Z"
finalizers:
- finalizers.object.portworx.io/access-secret
name: px-os-credentials-s3-pba
namespace: default
resourceVersion: "16022682"
uid: xxxxxxxx-xxxx-xxxx-xxxx-9e9d30aba97c
type: Opaque

Was this page helpful?