<p>This are the two yml file that I created for both master and slave </p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: db-disk-master
spec:
  accessModes:
  - ReadWriteOnce
  storageClassName: managed-premium
  resources:
    requests:
      storage: 5Gi

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: db-disk-slave
spec:
  accessModes:
  - ReadWriteOnce
  storageClassName: managed-premium
  resources:
    requests:
      storage: 5Gi
</code></pre>

<p>This is the command I used to install postgress</p>

<pre><code>helm install postgresql-db \
  --set persistence.existingClaim="db-disk-master"\
  --set replication.slaveReplicas=1 \
  --set replication.enabled=true \
  --values &lt;(echo '{
      "slave": {
        "extraVolumes": [
          {
            "name": "db-disk-slave"
          }
        ]
      }
   }') \
  bitnami/postgresql -n development
</code></pre>

<p>But when executing this in the slave node create a new volume and attaching to it without using the <code>"db-disk-slave"</code> volume. I want to attched the slave node into <code>"db-disk-slave"</code>  without creating a new volume</p>

Padmasankha
<p>For the Slave pod, the HELM chart allows you to set the PVC correct</p>

<pre><code>{{- if .Values.slave.extraVolumes }}
        {{- toYaml .Values.slave.extraVolumes | nindent 8 }}
        {{- end }}
</code></pre>

<p>to problem is in the content of the extraVolume variable</p>

<p>volumes:
    - name: volume
      persistentVolumeClaim:
        claimName:  db-disk-slave</p>

<p>this will allow the slave pod to receive a volume form an existing PVC</p>

<p>Hoping to helps you out, let me know if you would have any more questions</p>

<p>REF:</p>

<p><a href="https://github.com/helm/charts/blob/master/stable/postgresql/templates/statefulset-slaves.yaml#L271-L273" rel="nofollow noreferrer">https://github.com/helm/charts/blob/master/stable/postgresql/templates/statefulset-slaves.yaml#L271-L273</a></p>

<p><a href="https://learn.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv#use-the-persistent-volume" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv#use-the-persistent-volume</a></p>

<p>Additional from below comment:</p>

<pre><code>--values &lt;(echo '{
"slave": {
"extraVolumes": [
{
"name": "db-disk-slave"
}
]
}
}')

this needs to be updated to

--values &lt;(echo '{
"slave": {
"extraVolumes": [
{
"name": "volume",
"persistentVolumeClaim": { "claimName":  "db-disk-slave" }
}
]
}
}')
</code></pre>

<p>look at the reference documents <a href="https://learn.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv#use-the-persistent-volume" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv#use-the-persistent-volume</a></p>
