When should I use a storage class vs a persistent volume? #590
|
I'm currently using persistent volumes that I create manually for my users whenever there's a need to access a share from pods running in a namespace. Can storage classes make this easier? Or otherwise, when would you use storage classes vs persistent volumes? |
Answered by
andyzhangx
Mar 4, 2023
Replies: 1 comment 1 reply
|
@yrro with storage class, the driver could create a subDir dynamically, and if you want to create dozens of PVCs(e.g. statefulset), using storage class is the easier way, while if you only want to create one pvc and don't need to create a subDir(e.g. bring your own sub dir), then using pv also works. |
1 reply
Answer selected by
andyzhangx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@yrro with storage class, the driver could create a subDir dynamically, and if you want to create dozens of PVCs(e.g. statefulset), using storage class is the easier way, while if you only want to create one pvc and don't need to create a subDir(e.g. bring your own sub dir), then using pv also works.