I have done everting right still not getting full marks for this question
Solve this question on: ssh cluster1-controlplane
Create a storage class called orange-stc-cka07-str as per the properties given below:
Provisioner should be kubernetes.io/no-provisioner.
Volume binding mode should be WaitForFirstConsumer.
Next, create a persistent volume called orange-pv-cka07-str as per the properties given below:
Capacity should be 150Mi.
Access mode should be ReadWriteOnce.
Reclaim policy should be Retain.
It should use storage class orange-stc-cka07-str.
Local path should be /opt/orange-data-cka07-str.
Also add node affinity to create this value on cluster1-controlplane.
Finally, create a persistent volume claim called orange-pvc-cka07-str as per the properties given below:
**************************** StorageClass.yaml******************************
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: orange-stc-cka07-str
provisioner: kubernetes.io/no-provisioner # indicates that this StorageClass does not support automatic provisioning
volumeBindingMode: WaitForFirstConsumer
PersistentVolume.yaml******************
apiVersion: v1
kind: PersistentVolume
metadata:
name: orange-pv-cka07-str
spec:
storageClassName: orange-stc-cka07-str
capacity:
storage: 150Mi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
local:
path: /opt/orange-data-cka07-str
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- cluster1-controlplane
*******persistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: orange-pvc-cka07-str
spec:
storageClassName: orange-stc-cka07-str
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 128Mi
volumeName: orange-pv-cka07-str