2

I am using aws-ebs-csi-driver on k8s for persistent volumes. I came across a scenario where I can create ebs storage class once and then use it across all the statefulsets deployments to create PersistentVolumeClaims.

I am trying to weigh in advantages and disadvantages of this approach.

Is using one storage class for all statefulsets fine or Should I create storage class for each individual statefulset ?

1
  • 2
    I would say it depends on the needs. Adding this as a comment as I can share my own experience and not give a "right way" answer. We have multiple storages classes(3). We use aws-ebs-csi-driver for specific pods, but our structure requires shared storage for some parts, so we have fsx.csi.aws.com as a storage class that has 1.2 TB of shared space. Also in some environments like Test, which are lower, we have used the standard gp2, since the k8s is much smaller and other reasons. So to answer the question, if one class works for you use it, only change/add if you need to. Commented Sep 24, 2021 at 14:56

1 Answer 1

0

You should think about the needs of your applications.

Every storageClass have differents purposes, like the type of storage, the max size, ACLs, CSI, replications...

If you know that your storage can be "cold", you don't need to take a premium storage.

Every providers has it's own level of classes, check the doc of AWS to find the best option for your needs :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.