Hi @Tej Singh Rana, @unnivkn, all An issue is being faced in lab- "*CHALLENGE 1, . . .

Mudit:
Hi @Tej Singh Rana, @unnivkn, all
An issue is being faced in lab- "CHALLENGE 1, KUBERNETES CHALLENGE 1". Any inputs?
• A pv was already created at the beginning of the question.
• While trying to create pvc as first step, I created the pvc in the default name space by mistake - which got bound successfully. And then realizing the namespace mistake, I created another pvc with same details in correct ns now. And then deleted the old pvc in the default ns.
• It resulted in pv failure:

root@controlplane ~ ➜  k get pv,pvc -A
NAME                           CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                 STORAGECLASS    REASON   AGE
persistentvolume/jekyll-site   1Gi        RWX            Delete           Failed   default/jekyll-site   local-storage            11m

NAMESPACE     NAME                                STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS    AGE
development   persistentvolumeclaim/jekyll-site   Pending                                      local-storage   108s

root@controlplane ~ ➜  

• Below is the error in the pv:

root@controlplane ~ ➜  k describe pv jekyll-site 
Name:              jekyll-site
Labels:            <none>
Annotations:       <http://pv.kubernetes.io/bound-by-controller|pv.kubernetes.io/bound-by-controller>: yes
Finalizers:        [<http://kubernetes.io/pv-protection|kubernetes.io/pv-protection>]
StorageClass:      local-storage
Status:            Failed
Claim:             default/jekyll-site
Reclaim Policy:    Delete
Access Modes:      RWX
VolumeMode:        Filesystem
Capacity:          1Gi
Node Affinity:     
  Required Terms:  
    Term 0:        <http://kubernetes.io/hostname|kubernetes.io/hostname> in [node01]
Message:           error getting deleter volume plugin for volume "jekyll-site": no deletable volume plugin matched
Source:
    Type:  LocalVolume (a persistent volume backed by local storage on a node)
    Path:  /site
Events:
  Type     Reason              Age    From                         Message
  ----     ------              ----   ----                         -------
  Warning  VolumeFailedDelete  3m33s  persistentvolume-controller  error getting deleter volume plugin for volume "jekyll-site": no deletable volume plugin matched

root@controlplane ~ ➜  

Now the issue is PV is in failed state and no PVC is getting bounded to this PV.
I am wondering how to recover from this issue if by mistake it happens in exam?

unnivkn:
Hi @Mudit please follow this;
https://github.com/kodekloudhub/kubernetes-challenges

unnivkn:
Hi @Mudit also please retry the lab, looks like something crashed unexpectedly.

Mudit:
Hi @unnivkn, thank you for your inputs. Just wondering what to do in case this kind of scenario/issue occurs in real exam?
Any way to recover the PV?
or the only option is to tell the proctor that the environment is damaged?

unnivkn:
In fact PV should not crash if you do something on PVC, I don’t know what happened in your case. Any way I am not expecting similar scenario in real exam.

Mudit:
thanks for your help @unnivkn :slightly_smiling_face:

Hi @unnivkn
The issue I also faced.
It can be reprocessed in the following steps.
I also wonder how to fix PV, PVC, and SC in this scenario.

root@controlplane ~ ➜  cat  jekyll-site-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jekyll-site
  namespace: development
spec:
  storageClassName: local-storage
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
root@controlplane ~ ➜  k apply -f jekyll-site-pvc.yaml
root@controlplane ~ ➜  k delete pvc jekyll-site-pvc -n development 
root@controlplane ~ ➜  k apply -f jekyll-site-pvc.yaml
root@controlplane ~ ➜  k describe pv -n development
Name:              jekyll-site
Labels:            <none>
Annotations:       pv.kubernetes.io/bound-by-controller: yes
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      local-storage
Status:            Failed
Claim:             default/jekyll-site
Reclaim Policy:    Delete
Access Modes:      RWX
VolumeMode:        Filesystem
Capacity:          1Gi
Node Affinity:     
  Required Terms:  
    Term 0:        kubernetes.io/hostname in [node01]
Message:           error getting deleter volume plugin for volume "jekyll-site": no deletable volume plugin matched
Source:
    Type:  LocalVolume (a persistent volume backed by local storage on a node)
    Path:  /site
Events:
  Type     Reason              Age   From                         Message
  ----     ------              ----  ----                         -------
  Warning  VolumeFailedDelete  36s   persistentvolume-controller  error getting deleter volume plugin for volume "jekyll-site": no deletable volume plugin matched