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:

[email protected] ~ ➜  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

[email protected] ~ ➜  

• Below is the error in the pv:

[email protected] ~ ➜  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

[email protected] ~ ➜  

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.

[email protected] ~ ➜  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
[email protected] ~ ➜  k apply -f jekyll-site-pvc.yaml
[email protected] ~ ➜  k delete pvc jekyll-site-pvc -n development 
[email protected] ~ ➜  k apply -f jekyll-site-pvc.yaml
[email protected] ~ ➜  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