Create Storage Classes
This section explains how to create a storage class.
Prerequisites
-
You should join a cluster and have the Storage Class Management permission within the cluster. For more information, refer to "Cluster Members" and "Cluster Roles".
-
To ensure that the storage class can provide storage resources properly, you need to pre-configure the storage system and install the storage plugin corresponding to the storage system. For more information, please contact your storage system provider.
Steps
-
Log in to the KubeSphere web console with a user who has the Storage Class Management permission, and access your cluster.
-
Click Storage > Storage Classes in the left navigation pane.
-
Click Create on the page.
-
On the Basic Information tab, set the basic information for the storage class, then click Next.
Parameter Description Name
The name of the storage class. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 63 characters long.
Alias
The alias of the storage class. The aliases of different storage classes can be the same. The alias can only contain Chinese characters, letters, numbers, and hyphens (-), should not start or end with a hyphen (-), and can be up to 63 characters long.
Description
Description information for the storage class. The description can contain any characters and can be up to 256 characters long.
-
On the Storage System tab, select a system or Custom, then click Next.
-
On the Storage Class Settings tab, set the parameters for the storage class, then click Create.
Parameter Description Volume Expansion
Expanding capacity of Persistent Volumes in the KubeSphere web console is allowed or not.
Reclaim Policy
The reclaim policy of the Persistent Volume. KubeSphere defaults to the Delete reclaim policy, which means that when the Persistent Volume claim is deleted, the Persistent Volume is also deleted. For more information, refer to the Kubernetes Documentation.
Access Mode
The modes in which the volume can be accessed.
-
ReadWriteOnce: Allows a single node to read from and write to the volume.
-
ReadOnlyMany: Allows multiple nodes to read from the volume.
-
ReadWriteMany: Allows multiple nodes to read from and write to the volume.
You can select one or more access modes from the dropdown list. Some storage systems may not support certain access modes.
Provisioner
The storage plugin used by the storage class.
Volume Binding Mode
Specifies whether a Persistent Volume is immediately created and bound to a Persistent Volume Claim upon the creation of the Persistent Volume Claim. The following modes are supported:
-
Immediate Binding: Creates the Persistent Volume immediately after the Persistent Volume Claim is created and binds them.
-
Delayed Binding: Creates the Persistent Volume and binds it to the Persistent Volume Claim after the container mounting the Persistent Volume is created.
Parameter
Key-value pairs that match the parameters expected by the backend storage system and the storage plugin.
-
Click Add to set multiple parameters.
-
To delete a parameter, click next to the parameter.
For more information, please contact your storage system provider.
Once the storage class is created, it will be displayed in the storage class list.
-
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.