[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Unable to recreate PVC



Hi all!

Can someone please explain how can I recreate PVC with the same name?

I tried following but in the end, I still have Status: Lost


[root master1 ~]# oc describe pvc/etcd -n openshift-ansible-service-broker
Name:        etcd
Namespace:    openshift-ansible-service-broker
StorageClass:
Status:        Lost
Volume:
Labels:        <none>
Annotations:    pv.kubernetes.io/bind-completed=yes
        pv.kubernetes.io/bound-by-controller=yes
Capacity:
Access Modes:
Events:
  FirstSeen    LastSeen    Count    From                SubObjectPath
  Type        Reason        Message
  ---------    --------    -----    ----                -------------
  --------    ------        -------
  3m        3m        1    persistentvolume-controller
Warning        ClaimLost    Bound claim has lost reference to
PersistentVolume. Data on the volume is lost!
[root master1 ~]# oc delete pvc/etcd -n openshift-ansible-service-broker
persistentvolumeclaim "etcd" deleted
[root master1 ~]# oc get pvc -n openshift-ansible-service-broker
No resources found.
[root master1 ~]# cat pvc-etcd
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    pv.kubernetes.io/bind-completed: "yes"
    pv.kubernetes.io/bound-by-controller: "yes"
  creationTimestamp: null
  name: etcd
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1G
status: {}
[root master1 ~]# oc create -f pvc-etcd
persistentvolumeclaim "etcd" created
[root master1 ~]# oc describe pvc/etcd -n openshift-ansible-service-broker
Name:        etcd
Namespace:    openshift-ansible-service-broker
StorageClass:
Status:        Lost
Volume:
Labels:        <none>
Annotations:    pv.kubernetes.io/bind-completed=yes
        pv.kubernetes.io/bound-by-controller=yes
Capacity:
Access Modes:
Events:
  FirstSeen    LastSeen    Count    From                SubObjectPath
  Type        Reason        Message
  ---------    --------    -----    ----                -------------
  --------    ------        -------
  10s        10s        1    persistentvolume-controller
Warning        ClaimLost    Bound claim has lost reference to
PersistentVolume. Data on the volume is lost!


-- 

S pozdravom / Best regards
Daniel Kucera.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]