This document introduces Kubernetes administrators familiar with persistent storage concepts to the core resources and principles of the Container Object Storage Interface (COSI). COSI provides a declarative mechanism for managing object storage (such as AWS S3, MinIO, and Ceph RGW), similar to existing Kubernetes persistent storage management approaches.
We will cover the three primary resources in COSI—BucketClass, Bucket, and BucketClaim—drawing analogies with Kubernetes storage resources to clarify their relationships and functionalities.
COSI defines three essential resources:
Scope: Cluster-scoped Analogous Kubernetes Concept: Similar to StorageClass
BucketClass is created by cluster administrators to define specific types or service levels of buckets, including region location, redundancy policies, and performance tiers.
Key functions:
YAML Example:
Scope: Cluster-scoped Analogous Kubernetes Concept: Similar to PersistentVolume (PV)
Bucket represents an abstraction of an actual bucket present in an external object storage system (such as AWS S3, MinIO, Ceph RGW) within Kubernetes.
Lifecycle management:
Scope: Namespace-scoped Analogous Kubernetes Concept: Similar to PersistentVolumeClaim (PVC)
BucketClaim resources are created by application developers within their namespaces to request object storage buckets.
Workflow:
YAML Example:
The following process demonstrates the dynamic creation flow of COSI resources in practice:
| COSI Resource | Scope | Kubernetes Analogy | Purpose |
|---|---|---|---|
| BucketClass | Cluster-scoped | StorageClass | Defines bucket types and policies |
| Bucket | Cluster-scoped | PersistentVolume (PV) | Kubernetes abstraction for actual bucket |
| BucketClaim | Namespace-scoped | PersistentVolumeClaim (PVC) | User request for bucket resources |
By leveraging standardized APIs provided by COSI, Kubernetes administrators can declaratively and portably manage object storage resources, greatly enhancing integration efficiency between applications and object storage within Kubernetes clusters.