<p>I have the following <code>pvc</code> (Persistent Volume Claim):</p>

<pre><code>piVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-claim-web
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></pre>

<p>and the Google Cloud-backed <code>pv</code> (Persistent Volume):</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: test-pv-1
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  gcePersistentDisk:
    pdName: test-1
    fsType: ext4
</code></pre>

<p>and the Disk in Google cloud that exists.</p>

<p>If I create first the <code>pv</code> and after the <code>pvc</code>, <code>kubectl get pvc,pv</code> will show:</p>

<pre><code>NAME                                STATUS                                VOLUME            CAPACITY     ACCESSMODES              AGE
test-claim-web                      Bound                                 test-pv-1         10Gi         RWO                      15s
NAME                                CAPACITY                              ACCESSMODES       STATUS       CLAIM                    REASON    AGE
test-pv-1                           10Gi                                  RWO               Bound        default/test-claim-web             25s
</code></pre>

<p>But if I delete and recreate the <code>pv</code>, <code>kubectl get pvc,pv</code> will show:</p>

<pre><code>NAME                                STATUS                                VOLUME            CAPACITY     ACCESSMODES              AGE
test-claim-web                      Bound                                 test-pv-1         10Gi         RWO                      3m
NAME                                CAPACITY                              ACCESSMODES       STATUS       CLAIM                    REASON    AGE
test-pv-1                           10Gi                                  RWO               Available                                       18s
</code></pre>

<ul>
<li>Why is the <code>pvc</code> still <code>Bound</code>?</li>
<li>Doesn't the <code>pvc</code> (re-)bind automatically? (I also observed that creating the <code>pv</code> after the <code>pvc</code> makes the <code>pvc</code> wait forever with <code>Pending</code> status.)</li>
</ul>

<p>I use the following Kubernetes version:</p>

<pre><code>Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}
</code></pre>

<blockquote>
  <p>if I delete and recreate the pv, kubectl get pvc,pv will show [bound].
  Why is the pvc still Bound?</p>
</blockquote>

<p>That's bug in Kubernetes 1.2, it will be fixed in 1.3. Both PV and PVC should get Bound eventually.</p>

<p>However, deleting a bound PV is very bad idea, as the PVC may be used in a running pod and the pod suddenly looses storage underneath. You should never touch bound PVs!</p>

<blockquote>
  <p>I also observed that creating the pv after the pvc makes the pvc wait forever with Pending status</p>
</blockquote>

<p>It won't wait forever, it should get bound after 10 minutes. Use <code>kube-controller-manager --pvclaimbinder-sync-period=15s</code> to shorten it to 15 seconds. Again, this will be better in Kubernetes 1.3, 15 seconds will be default there.</p>
