// Module included in the following assemblies:
//
// * storage/dynamic-provisioning.adoc
// * microshift_storage/dynamic-provisioning-microshift.adoc

:_mod-docs-content-type: REFERENCE
[id="basic-storage-class-definition_{context}"]
= Basic StorageClass object definition

[role="_abstract"]
A `StorageClass` object defines the metadata, provisioner type, and plugin-specific parameters that determine how persistent volumes (PVs) are dynamically created in your cluster. Each storage provisioner type requires different parameters, and annotations control cluster-wide defaults, making this structure the foundation for all dynamic storage provisioning.

ifndef::openshift-rosa,openshift-rosa-hcp[]
.Example `StorageClass` definition
[source,yaml]
----
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: <storage-class-name>
  annotations:
    storageclass.kubernetes.io/is-default-class: 'true'
    ...
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp3
...
----
* `kind`: API object type.

* `apiversion`: The current apiVersion.

* `metadata.name`: The name of the storage class.

* Optional: `metadata.annotations`: Annotations for the storage class.

* `provisioner`: The type of provisioner associated with this storage class.

* Optional: `parameters`: The parameters required for the specific provisioner. This is different for each plugin.
endif::openshift-rosa,openshift-rosa-hcp[]

ifdef::openshift-rosa,openshift-rosa-hcp[]
.Example `StorageClass` definition
[source,yaml]
----
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: <storage-class-name>
  annotations:
    storageclass.kubernetes.io/is-default-class: 'true'
    ...
provisioner: ebs.csi.aws.com
parameters:
  type: gp3-csi
...
----
* `kind`: API object type.

* `apiversion`: The current apiVersion.

* `metadata.name`: The name of the storage class.

* Optional: `metadata.annotations`: Annotations for the storage class.

* `provisioner`: The type of provisioner associated with this storage class.

* Optional: `parameters`: The parameters required for the specific provisioner. This is different for each plugin.
endif::openshift-rosa,openshift-rosa-hcp[]
