Is Storage Class optional? As I understood PV can copy the volume from actual storage via CSI and PVC retrieves the required data from the PV instead of directly going to Storage as PODs are ephemeral. How does SC helps and what is it basically used for when we have PV.
with PV you have to have provisioned the storage on your storage provider, but SC dynamically provisions that for you
StorageClass is just a higher level of abstraction over PersistentVolumes (PV).
Think of them as a plugin to the cloud-provided storage (either aws s3/ebs, gcp gcs/pd). You put in the parameters of the StorageClass, then just reference the
In term, say whenever a Pod is deployed .. it will trigger a PV which in turn talks to the
StorageClass has a
provisioner type, which essentially points to the volume plugin. So something more concrete:
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: fast provisioner: kubernetes.io/aws-ebs parameters: type: io1 zones: us-west-1 iopsPerGB: "10"