Search⌘ K

Creating StorageClasses

Explore how to create and manage Kubernetes StorageClasses to support persistent storage for stateful applications. Understand the process from creating a StorageClass, deploying applications with PersistentVolumeClaims, to verifying dynamic provisioning of AWS EBS volumes in your cluster under the fast StorageClass configuration.

Creating the class

Let’s create our StorageClass:

Shell
kubectl create -f pv/sc.yml

The output shows that the storageclass "fast" was created.

Verification

Let’s list the StorageClasses in our cluster.

Shell
kubectl get sc

The output is as follows:

Shell
NAME PROVISIONER AGE
default kubernetes.io/aws-ebs 58m
fast kubernetes.io/aws-ebs 19s
gp2 (default) kubernetes.io/aws-ebs 58m

We can see that, this time, we have a new StorageClass.

Creating the Deployment

Let’s look at yet another Jenkins definition:

Shell
cat pv/jenkins-sc.yml

The output (limited to ...