<p>I have 2 different namespace: <strong>prod-01</strong> and <strong>prod-02</strong>, What I want to do is build a copy of my <strong>prod-01</strong> into <strong>prod-02</strong> namespace keeping the same names for its pvcs, so that I don't have to maintain 2 sets of charts for each different namespace. </p>

<p>Here's how it looks like:</p>

<pre><code>$ kubectl get ns | grep prod
prod-01          Active    178d
prod-02          Active    8d
$ 
</code></pre>

<p>As shown below, I have 2 pairs of pv's for each namespace:</p>

<pre><code>$ kubectl get pv -o wide | grep prod
prod-01-db-pv                    50Gi       RWX            Retain           Bound       prod-01/app-db                                                                      164d
prod-01-nosql-db-pv              5Gi        RWX            Retain           Bound       prod-01/app-nosql-db                                                                149d
prod-02-db-pv                50Gi       RWX            Retain           Available   prod-02/app-db                                                          41m
prod-02-nosql-db-pv          5Gi        RWX            Retain           Available   prod-02/app-nosql-db                                                    19m
$ 
</code></pre>

<p>Here's how pvc's for <strong>prod-01</strong> are being displayed:</p>

<pre><code>$ kubectl get pvc --namespace=prod-01
NAME              STATUS    VOLUME               CAPACITY   ACCESS MODES   STORAGECLASS   AGE
app-db         Bound     prod-01-db-pv         50Gi       RWX                           164d
app-nosql-db   Bound     prod-01-nosql-db-pv   5Gi        RWX                           149d
$ 
</code></pre>

<p>And here's what I'm trying to accomplish:</p>

<pre><code>$ kubectl get pvc --namespace=prod-02
NAME              STATUS    VOLUME                   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
app-db         Pending   prod-02-db-pv         0                                        2m
app-nosql-db   Pending   prod-02-nosql-db-pv   0                                        24m
$ 
</code></pre>

<p>As shown above, the pvc's for <strong>prod-02</strong> namespace are stuck forever with <strong>Pending</strong> status. </p>

<p>Them when I change the pvc names on <strong>prod-02</strong> to anything different, they bond as expected.</p>

<p>Which leads me to think I can't use the same names on pvc's even when they are in different namespaces and pointing to different pv's ... However, when searching the documentation, I could not find any evidence to this issue, and was wondering if I could be missing something. </p>

<p>So to put it simple, can I have multiple pvc's with the same name accross different namespaces (considering that they are using different pv's)?</p>

<hr>

<p><strong>Update:</strong> result of <code>kubectl describe pvc</code> </p>

<pre><code>$ kubectl describe pvc app-db --namespace=prod-02
Name:          app-db
Namespace:     prod-02
StorageClass:  
Status:        Pending
Volume:        prod-02-db-pv
Labels:        &lt;none&gt;
Annotations:   &lt;none&gt;
Finalizers:    []
Capacity:      0
Access Modes:  
Events:        &lt;none&gt;
$ 
</code></pre>

<p>Also here's the output of <code>kubectl get pvc</code>:</p>

<pre><code>$ kubectl get pvc app-db --namespace=prod-02  -o yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: 2018-09-22T22:00:34Z
  name: app-db
  namespace: prod-02
  resourceVersion: "43027607"
  selfLink: /api/v1/namespaces/prod-02/persistentvolumeclaims/app-db
  uid: ee81b951-beb2-11e8-b972-005056bbded7
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 50Gi
  volumeName: prod-02-db-pv
status:
  phase: Pending
$ 
</code></pre>

<p>And here are some details about the pv too:</p>

<pre><code>$ kubectl get pv prod-02-db-pv --namespace=prod-02 -o yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  creationTimestamp: 2018-09-22T21:15:19Z
  name: prod-02-db-pv
  resourceVersion: "43020171"
  selfLink: /api/v1/persistentvolumes/prod-02-db-pv
  uid: 9c07d7a6-beac-11e8-b972-005056bbded7
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 50Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: app-db
    namespace: prod-02
  nfs:
    path: /nfs_server/prod02/db
    server: 158.87.52.35
  persistentVolumeReclaimPolicy: Retain
status:
  phase: Available
$ 
</code></pre>

<hr>

<p>Thanks in advance for the help!</p>

silveiralexf
<p>PVC is a namespaced resource but not PV. ie., you can have multiple PVC's with same name across difference namespaces.</p>

<p>There might be issues in the way you have configured the  pv.</p>

<p>Can you make sure you are using the right ip address in pv configuration just under <code>nfs</code> attribute:</p>

<pre><code>nfs:
path: /nfs_server/prod01/db
server: 158.87.52.35
</code></pre>
