Hi, storageClassName in PV & PVC can be anything? it just need to match for . . .

Poorni:
Hi, storageClassName in PV & PVC can be anything? it just need to match for the correct binding…

storageClassName: PPPPTest 

unnivkn:
StoragecClass is ak8s object like Pods & Deployments. Its not like you can use any name.

unnivkn:

apiVersion: <http://storage.k8s.io/v1|storage.k8s.io/v1>
kind: StorageClass
metadata:
  name: standard
provisioner: <http://kubernetes.io/aws-ebs|kubernetes.io/aws-ebs>
parameters:
  type: gp2
reclaimPolicy: Retain
allowVolumeExpansion: true
mountOptions:
  - debug
volumeBindingMode: Immediate

Poorni:
While defining pv & pvc, we dont define the above. sorry trying to understand. All along i was thinking it has predefined values. while practicing noticed it accepts other values too. i tried with value “exam”

apiVersion: v1
kind: PersistentVolume
metadata:
  name: task-pv-volume
  labels:
    type: local
spec:
  storageClassName: exam
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: task-pv-claim
spec:
  storageClassName: exam
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi

unnivkn:
Ok… In this example, can you please remove storageClassName & try to create pv & pvc ?

unnivkn:
https://blog.mayadata.io/kubernetes-storage-basics-pv-pvc-and-storageclass