Need inputs on creating a StorageClass, PV and PVCs in an on-prem Kubernetes cluster

I followed the Kubernetes installation on Ubuntu 18.04 and got my 5 node (4 workers) k8s cluster up and running.

But, as soon as I want to have a PVC/PV for any of the off-the-shelf try out application, it fails as it cant allocate a PVC and PV.

I see the below error:

$ kubectl get pvc
NAME             STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
myapp-buffer   Pending                                                     127m
   
$ kubectl describe pvc myapp-buffer
   Name:          myapp-buffer
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        app=myapp
           release=test
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Filesystem
Events:
  Type       Reason         Age                     From                         Message
  ----       ------         ----                    ----                         -------
  Normal     FailedBinding  2m57s (x503 over 128m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set

Following the error, I did :

$ k8 get sc
no resources found 

Thus, realized that there is no storageClass defined, which was STANDARD when I was trying with minikube.

Therefore, need inputs on whats the best way to get a StorageClass defined in an on-prem cluster, which allows apps to create their PVC and PV’s and is visible across k8s cluster and behaves more or less like a standard storage.

P.S.

  1. I did try creating StorageType = local-storage (link) , but then most of the apps I was trying wanted a StorageType=Standard. So, this setups didn’t help.
  2. Just to try out i did name it STANDARD instead of local-storage, but that also didn’t fly with the apps looking for STANDARD storage.
  3. I also tried out Rook’s Cassandra, but that also fails with same thing that its PVC couldn’t be created. Not sure, if trying Rook’s Ceph will help in having a underlying cluster FS kind of layer ?

You might want to also take a look at storageOS and portworx. I’ve heard good things about both.

If you being in the cloud is an option you could take advantage of storage types there as well.