title: does kubernetes pv recognize namespace when created/queried with kubectl?
body: <p>I am using GKE with kubectl installed from gcloud components.
  I have created a pv (gcePersistentDisk) with namespace scope using kubectl.</p>
  
  <pre><code>apiVersion: v1
  kind: PersistentVolume
  metadata:
    name: cstor-cs-a-disk-david
    namespace: ns-david
  spec:
    gcePersistentDisk:
      pdName: cstor-cs-a-disk-david
      fsType: ext4
      partition: 0
      readOnly: false
    accessModes:
      - ReadWriteOnce
    persistentVolumeReclaimPolicy: Retain
    capacity:
      storage: 200Gi
  </code></pre>
  
  <p>This says that specifying namespace with create pv is/was valid:<br>
  <a href="http://kubernetes.io/third_party/swagger-ui/#!/api%2Fv1/createNamespacedPersistentVolume" rel="noreferrer">http://kubernetes.io/third_party/swagger-ui/#!/api%2Fv1/createNamespacedPersistentVolume</a></p>
  
  <p>When I run 'kubectl get pv' I see the pv.</p>
  
  <pre><code>$ kubectl get pv
  NAME                    LABELS    CAPACITY       ACCESSMODES   STATUS      CLAIM     REASON
  cstor-cs-a-disk-david   &lt;none&gt;    214748364800   RWO           Available
  </code></pre>
  
  <p>I did not expect this because the pv wasn't created with the default namespace scope.</p>
  
  <p>The same happens if I specify a namespace argument (valid or not).</p>
  
  <pre><code>$ kubectl get namespaces
  NAME          LABELS    STATUS
  default       &lt;none&gt;    Active
  kube-system   &lt;none&gt;    Active
  ns-david      &lt;none&gt;    Active
  
  $ kubectl get pv --namespace=demo
  NAME                    LABELS    CAPACITY       ACCESSMODES   STATUS      CLAIM     REASON
  cstor-cs-a-disk-david   &lt;none&gt;    214748364800   RWO           Available
  </code></pre>
  
  <p>If I create a claim against this pv and query it with 'kubectl get pvc' then the claim is not found but is found when I specify the correct namespace.</p>
  
  <pre><code>apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: cstor-cs-a-disk-claim-david
    namespace: ns-david
  spec:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 200Gi
    volumeName: cstor-cs-a-disk-david
  
  $ kubectl get pvc
  NAME      LABELS    STATUS    VOLUME
  
  $ kubectl get pvc --namespace=ns-david
  NAME                          LABELS    STATUS    VOLUME
  cstor-cs-a-disk-claim-david   map[]     Bound     cstor-cs-a-disk-david
  </code></pre>
  
  <p>Do pv have namespace scope or are they global?</p>