Provisioning a pvc in OpenShift does not work with message: "storageclass.storage.k8s.io not found"

Solution Verified - Updated -

Issue

  • Need to change storage class from gluterfs-storage to glusterfs-storage-block or vice versa without reinstalling;

  • Pod won't start because persistentvolumeclaim is not bound, event log shows:

    $ oc get events -n openshift-logging
    LAST SEEN   FIRST SEEN   COUNT     NAME                            KIND                    SUBOBJECT   TYPE      REASON               SOURCE                        MESSAGE
    Warning  FailedScheduling  4m (x2435 over 14m)  default-scheduler  pod has unbound PersistentVolumeClaims (repeated 4 times)
    
  • Getting storageclass.storage.k8s.io not found message in pvc events:

    $ oc get events -n openshift-logging
    [...]
    LAST SEEN   FIRST SEEN   COUNT     NAME                            KIND                    SUBOBJECT   TYPE      REASON               SOURCE                        MESSAGE
    3m          21h          5416      logging-es-0.153a43bd97509119   PersistentVolumeClaim               Warning   ProvisioningFailed   persistentvolume-controller   storageclass.storage.k8s.io "glusterfs" not found
    
  • The PersistentVolumeClaim logging-es-0 used by Elasticsearch is in Pending state without a storage class set.

    $ oc get pvc 
    NAME           STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
    logging-es-0   Pending                                                     5m18s
    
  • How to change Elasticsearch Persistent Volume Claim (PVC) to another storage class in OpenShift?

Environment

  • Red Hat OpenShift Container Platform (OCP) 3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content