Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

storageclass.storage.k8s.io "standard" not found for pvc on bare metal Kubernetes cluster

I've created a persistentVolumeClaim on my custom Kubernetes cluster, however it seems to be stuck in pending...

Do I need to install/configure some additional something? OR is this functionality only available on GCP / AWS?

pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
spec:
  storageClassName: standard
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
metadata:
  name: testingchris

describe pvc:

Name:          testingchris
Namespace:     diyclientapps
StorageClass:  standard
Status:        Pending
Volume:        
Labels:        <none>
Annotations:   kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"name":"testingchris","namespace":"diyclientapps"},"spec":{"accessModes"...
Finalizers:    []
Capacity:      
Access Modes:  
Events:
  Type     Reason              Age               From                         Message
  ----     ------              ----              ----                         -------
  Warning  ProvisioningFailed  8s (x3 over 36s)  persistentvolume-controller  storageclass.storage.k8s.io "standard" not found
like image 279
Chris Stryczynski Avatar asked Mar 08 '18 13:03

Chris Stryczynski


People also ask

What is StorageClass storage k8s io?

A Kubernetes StorageClass is a Kubernetes storage mechanism that lets you dynamically provision persistent volumes (PV) in a Kubernetes cluster. Kubernetes administrators define classes of storage, and then pods can dynamically request the specific type of storage they need.

How is storage class defined in PVC?

Users simply refer to a StorageClass by name in the PersistentVolumeClaim (PVC) using the “storageClassName” parameter. In the following example, a PVC refers to a specific storage class named “gold”. If storageClassName is not specified in the PVC, the default storage class will be used for provisioning.

How do you check PVC Kubernetes?

Using kubectl get pv and pvc commands The kubectl get pv and kubectl get pvc commands can be used to see what PersistentVolume and PersistentVolumeClaim have been defined for the application. The above output shows information about the Persistent Volume and Persistent Volume Claim for PowerAI Vision.


1 Answers

PVC is just a Claim, a declaration of ones requirements for persistent storage.

For PVC to bind, a PV that is matching PVC requirements must show up, and that can happen in two ways : manual provisioning (adding a PV from ie. kubectl) or with Dynamic Volume Provisioning

What you experience is that your current setup did not auto provision for your PVC

like image 149
Radek 'Goblin' Pieczonka Avatar answered Nov 16 '22 01:11

Radek 'Goblin' Pieczonka