title: persistentvolumeclaim not found in kubernetes
body: <p>Currently i try to implement <strong>PersistentVolume</strong> in my yaml file . 
  I read a lot of documentation on internet and i dont understand why when i go to the dashboard pod i've  this message </p>
  
  <blockquote>
    <p>persistentvolumeclaim "karaf-conf" not found</p>
  </blockquote>
  
  <p>pod.yaml</p>
  
  <pre><code>apiVersion: v1
  kind: Pod
  metadata:
    name: karafpod
  spec:
    containers:
    - name: karaf
      image: xxx/karaf:ids-1.1.0
      volumeMounts:
      - name: karaf-conf-storage
        mountPath: "/apps/karaf/etc"
    volumes:
      - name: karaf-conf-storage
        persistentVolumeClaim:
          claimName: karaf-conf-claim
  </code></pre>
  
  <p><strong>PersistentVolumeClaimKaraf.yml</strong></p>
  
  <pre><code>kind: PersistentVolumeClaim
  apiVersion: v1
  metadata:
    name: karaf-conf-claim
  spec:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 10Mi
  </code></pre>
  
  <p><strong>PersistentVolume.yaml</strong></p>
  
  <pre><code>kind: PersistentVolume
  apiVersion: v1
  metadata:
    name: karaf-conf
    labels:
      type: local
  spec:
    capacity:
      storage: 100Mi
    accessModes:
      - ReadWriteOnce
    hostPath:
      path: "/apps/karaf/etc"
  </code></pre>
  
  <p>You will find below the result of the command <strong>kubectl get pv</strong> </p>
  
  <pre><code>NAME                             CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS        CLAIM                         STORAGECLASS   REASON    AGE
  karaf-conf                    100Mi      RWO            Retain           Terminating   default/karaf-conf-claim                            17h
  karaf-conf-persistentvolume   100Mi      RWO            Retain           Released      default/karaf-conf                                  1h
  </code></pre>
  
  <p><strong>kubectl get pvc</strong></p>
  
  <pre><code>NAME                  STATUS        VOLUME          CAPACITY   ACCESS MODES   STORAGECLASS   AGE
  karaf-conf-claim   Terminating   karaf-conf   10Mi       RWO            manual         17h
  </code></pre>