This section provides details for some of the operations that need to be performed when managing COSI components.
Refer to Quickstart Guide for installation instructions.
Refer to Installing Driver for detailed steps.
These resources define storage classes and access policies for object storage.
---
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketAccessClass
metadata:
name: example-accessclass
driverName: cosi.example.com
authenticationType: Key
parameters:
foo: bar
---
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketClass
metadata:
name: example-class
driverName: cosi.example.com
deletionPolicy: Delete
parameters:
foo: bar
A BucketClaim
requests a new bucket provisioned by the COSI driver.
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketClaim
metadata:
name: example-claim
spec:
bucketClassName: example-class
protocols: [ 'S3' ]
A BucketAccess
grants access to a previously created bucket claim.
apiVersion: objectstorage.k8s.io/v1alpha1
kind: BucketAccess
metadata:
name: example-access
spec:
bucketClaimName: example-claim
protocol: S3
bucketAccessClassName: example-accessclass
credentialsSecretName: example-secret
Applications can access COSI-provisioned object storage credentials using Kubernetes Secrets.
spec:
template:
spec:
containers:
- volumeMounts:
- mountPath: /conf
name: example-secret-vol
volumes:
- name: example-secret-vol
secret:
secretName: example-secret
items:
- key: BucketInfo
path: BucketInfo